When changing the various cross targets in the Dockerfile I neglected
some `;`.
Instead of dealing with that now this just sets `--platform` on the
cross specific targets which only work on linux/amd64 anyway.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
... | ... |
@@ -89,19 +89,17 @@ RUN /download-frozen-image-v2.sh /build \ |
89 | 89 |
|
90 | 90 |
FROM base AS cross-false |
91 | 91 |
|
92 |
-FROM base AS cross-true |
|
92 |
+FROM --platform=linux/amd64 base AS cross-true |
|
93 | 93 |
ARG DEBIAN_FRONTEND |
94 | 94 |
RUN dpkg --add-architecture armhf |
95 | 95 |
RUN dpkg --add-architecture arm64 |
96 | 96 |
RUN dpkg --add-architecture armel |
97 | 97 |
RUN --mount=type=cache,sharing=locked,id=moby-cross-true-aptlib,target=/var/lib/apt \ |
98 | 98 |
--mount=type=cache,sharing=locked,id=moby-cross-true-aptcache,target=/var/cache/apt \ |
99 |
- if [ "$(go env GOHOSTARCH)" = "amd64" ]; then \ |
|
100 |
- apt-get update && apt-get install -y --no-install-recommends \ |
|
101 |
- crossbuild-essential-armhf \ |
|
102 |
- crossbuild-essential-arm64 \ |
|
103 |
- crossbuild-essential-armel \ |
|
104 |
- fi |
|
99 |
+ apt-get update && apt-get install -y --no-install-recommends \ |
|
100 |
+ crossbuild-essential-armhf \ |
|
101 |
+ crossbuild-essential-arm64 \ |
|
102 |
+ crossbuild-essential-armel |
|
105 | 103 |
|
106 | 104 |
FROM cross-${CROSS} as dev-base |
107 | 105 |
|
... | ... |
@@ -113,7 +111,7 @@ RUN --mount=type=cache,sharing=locked,id=moby-cross-false-aptlib,target=/var/lib |
113 | 113 |
libapparmor-dev \ |
114 | 114 |
libseccomp-dev |
115 | 115 |
|
116 |
-FROM cross-true AS runtime-dev-cross-true |
|
116 |
+FROM --platform=linux/amd64 cross-true AS runtime-dev-cross-true |
|
117 | 117 |
ARG DEBIAN_FRONTEND |
118 | 118 |
# These crossbuild packages rely on gcc-<arch>, but this doesn't want to install |
119 | 119 |
# on non-amd64 systems. |
... | ... |
@@ -121,19 +119,17 @@ ARG DEBIAN_FRONTEND |
121 | 121 |
# other architectures cannnot crossbuild amd64. |
122 | 122 |
RUN --mount=type=cache,sharing=locked,id=moby-cross-true-aptlib,target=/var/lib/apt \ |
123 | 123 |
--mount=type=cache,sharing=locked,id=moby-cross-true-aptcache,target=/var/cache/apt \ |
124 |
- if [ "$(go env GOHOSTARCH)" = "amd64" ]; then \ |
|
125 |
- apt-get update && apt-get install -y --no-install-recommends \ |
|
126 |
- libseccomp-dev:armhf \ |
|
127 |
- libseccomp-dev:arm64 \ |
|
128 |
- libseccomp-dev:armel \ |
|
129 |
- libapparmor-dev:armhf \ |
|
130 |
- libapparmor-dev:arm64 \ |
|
131 |
- libapparmor-dev:armel \ |
|
132 |
- # install this arches seccomp here due to compat issues with the v0 builder |
|
133 |
- # This is as opposed to inheriting from runtime-dev-cross-false |
|
134 |
- libapparmor-dev \ |
|
135 |
- libseccomp-dev \ |
|
136 |
- fi |
|
124 |
+ apt-get update && apt-get install -y --no-install-recommends \ |
|
125 |
+ libseccomp-dev:armhf \ |
|
126 |
+ libseccomp-dev:arm64 \ |
|
127 |
+ libseccomp-dev:armel \ |
|
128 |
+ libapparmor-dev:armhf \ |
|
129 |
+ libapparmor-dev:arm64 \ |
|
130 |
+ libapparmor-dev:armel \ |
|
131 |
+ # install this arches seccomp here due to compat issues with the v0 builder |
|
132 |
+ # This is as opposed to inheriting from runtime-dev-cross-false |
|
133 |
+ libapparmor-dev \ |
|
134 |
+ libseccomp-dev |
|
137 | 135 |
|
138 | 136 |
|
139 | 137 |
FROM runtime-dev-cross-${CROSS} AS runtime-dev |