Skip to content

Commit

Permalink
chore: build using only amd64 builders
Browse files Browse the repository at this point in the history
Our CI amd64 builders are 3-4 times faster to build Talos than our arm64
builders when building Talos.

Our Dockerfile was restructured a while ago to support cross-compilation
on all platforms but CI was still using amd64/arm64 workers, so arm64
part was done on arm64 builders.

As our CI runs on Talos, `binfmt_misc` is not enabled in the kernel, but
buildkit has built-in QEMU emulation layer which works just fine for
those small pieces which actually need to run arm64 binaries on amd64
(mostly `apk add` in the installer container). Interesting enough,
buildkit QEMU support fails for `ca-certificates` script which runs
after install. At the same time I believe we don't need
`ca-certificates` in the installer, as installer doesn't download
anything from the network, and `ca-certificates` were added a while ago
when installer was actually downloading configuration on its own.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Oct 5, 2021
1 parent e9b0f01 commit ce65ca4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ local setup_ci = {
'make ./_out/sonobuoy',
'make ./_out/kubectl',
],
environment: {
"BUILDKIT_FLAVOR": "cross",
},
volumes: volumes.ForStep(),
};

Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,8 @@ COPY --from=pkg-grub / /
COPY --from=unicode-pf2 /usr/share/grub/unicode.pf2 /usr/share/grub/unicode.pf2

FROM alpine:3.14.1 AS installer
RUN apk add --no-cache --update \
RUN apk add --no-cache --update --no-scripts \
bash \
ca-certificates \
efibootmgr \
mtools \
qemu-img \
Expand Down

0 comments on commit ce65ca4

Please sign in to comment.