Jobs build_image, build_image_no_push, build_and_push_image use docker
buildkit and can be used with a docker in docker executor jobteaser/circleci-docker-build:latest
Job build_multi_arch use docker buildx and could be used with a machine
executor like ubuntu-2404:current.
The Job build docker image in 2 architecture: arm64 and amd64.
In a one step, docker buildx command used with multi tag -t and --push
parameters to handle the images built on the different multi arch builder and
successfully push it in both Docker.io and jt Harbor registries. These task
could not be done in different steps for now.
For more info refer to buildx related issues 1 and 2
If the Dockerfile having architecture related steps like build a go binary or install a install an architecture-depending library, let to find the architecture name.
An agnostic command is uname -m that works for every Linux but mind a result
as :
aarch64 for arm64x86_64 for amd64Debian based distribution have dpkg --print-architecture that give arm64 or
amd64 as result.
Then, the result should be exported in a variable export ARCH=$(uname -m)
for example in the krakend Dockerfile
Content type
Image
Digest
sha256:651d1137a…
Size
180.3 MB
Last updated
18 days ago
docker pull jobteaser/circleci-docker-build