-
Suggestion
-
Resolution: Unresolved
Please allow --privileged flag to build multiarch docker images.
According to this article, it is possible with Github + Travis :
http://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/
Register qemu-*-static for all supported processors except the current one
docker run --rm --privileged multiarch/qemu-user-static:register
Currently, the following error is return when running the pipeline:
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
docker: Error response from daemon: authorization denied by plugin pipelines: Command not supported.
See 'docker run --help'.
Thanks
[BCLOUD-15317] Allow building multi-architecture Docker images (e.g. ARM images)
Pinned comments
All comments
All comments
It's also possible to build multi-arch images with buildx via Bitbucket cloud pipeline. It's based on
https://docs.docker.com/build-cloud/ci/.
This step definition works well for us:
- step: name: Build Docker image script: # Enable buildx - mkdir -vp ~/.docker/cli-plugins/ - curl --silent -L --output ~/.docker/cli-plugins/docker-buildx "https://github.com/docker/buildx-desktop/releases/download/v0.18.0-desktop.2/buildx-v0.18.0-desktop.2.linux-amd64" - chmod a+x ~/.docker/cli-plugins/docker-buildx - docker login --username $DOCKER_USER --password $DOCKER_PASSWORD - docker buildx create --driver cloud flexifyio/flexify # Build - docker buildx build --builder cloud-flexifyio-flexify --platform linux/amd64,linux/arm64 --pull --tag flexifyio/engine:edge --push . services: - docker
It runs the actual Docker builds in Docker Build Cloud, but our Dockerfile just copies artifacts that we've built on the previous pipeline steps. It is completed in seconds and is not a big deal.