-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add (experimental) buildx support to allow simple multiarch builds #1874
Comments
I am also interested in getting the "buildx" feature added to Docker Hub Automated Builds. Right now I am using 'hooks' to override the build phase, manually create manifests, etc in Docker Hub Automated Builds. I would prefer to use buildx, but not sure if it's available in the Docker Hub build environment? |
Looks like 'buildx' plugin can be enabled and used on Docker Hub Automated Builds, but upon inspection during a pre_build hook, it appears that the supported platforms only includes See Docker Hub build logs, after executing the pre_build hook in my repo here: |
I have not yet been able to get multiarch builds working locally. I haven't found comprehensive instructions, yet. At least the following is needed:
I got stuck at setting up QEMU emulation support, when trying this locally, because I got the older version. At this moment I'm not sure where the limitation with Docker Hub lies, and whether this limitation can be overcome. |
I'm also looking for this. Right now I'm trying to understand if Docker 19.03+ has already been made available on Docker Hub, but the platform is very, very slow. |
the docker version is 18.03.1 on Docker Hub.It does not support buildx. I think the first thing is to upgrade docker to 19.03+.By the way, an other to build multiarch images is to use KernelVersion: 4.4.0-1060-aws
Arch: amd64
BuildTime: 2018-08-30T18:42:30.000000000+00:00
ApiVersion: 1.37
Platform: {u'Name': u''}
Version: 18.03.1-ee-3
MinAPIVersion: 1.12
GitCommit: b9a5c95
Os: linux
GoVersion: go1.10.2
.
├── amd64
│ └── Dockerfile
└── arm64
├── Dockerfile
└── hooks
└── pre_build pre_build
arm64/Dockerfile
|
Docker Hub automated builds seem to now run Docker version |
I’ve messed around with it last weekend, but couldn’t get the buildx worker to support something different than amd64 or i386. I’ve even installed qemu manually and not via apt |
@timbru31 what approach did you experiment with? (hooks are way beyond my skill and overly complex for basic multiarch builds. I have used it locally on docker desktop and it works brilliantly). I assume for docker hub to use buildx it would:
then after this one needs to execute ones docker buildx command line? did you manage to run these commands in dockerhub somehow? |
@scyto I've used hooks to execute the required bash commands first (apt-get update, install qemu, enable experimental support). And yes those commands did run successfully, but no other arch support was present. I've switched to GitHub Actions in the meanwhile, it's 100000% faster, too. (example: https://github.com/timbru31/docker-java-node/blob/master/.github/workflows/buildx.yml) |
folks, you can now build with |
@arkodg would multiarch builds already work with this? |
@marklagendijk, not supported yet, but its part of the roadmap |
If I would like to build for both amd64 and arm64, how would I do that? I've added a BUILD ENVIRONMENT VARIABLE on Docker Hub. DOCKER_BUILDKIT=1 How do I specify which architectures it should build for? |
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day.
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day.
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day.
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day.
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day.
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day.
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created: - DOCKERHUB_USERNAME - DOCKERHUB_TOKEN - GH_USERNAME - GH_TOKEN 2. Autobuilds @ DockerHub to be disabled (this takes exactly on that)
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created: - DOCKERHUB_USERNAME - DOCKERHUB_TOKEN - GH_USERNAME - GH_TOKEN 2. Autobuilds @ DockerHub to be disabled (this takes exactly on that)
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created: - DOCKERHUB_USERNAME - DOCKERHUB_TOKEN - GH_USERNAME - GH_TOKEN 2. Autobuilds @ DockerHub to be disabled (this takes exactly on that)
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created or used: - DOCKERHUB_USERNAME (to create) - DOCKERHUB_TOKEN (to create) - GH_USERNAME (to create) - GITHUB_TOKEN (to use) 2. Autobuilds @ DockerHub to be disabled (this takes exactly on that)
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created or used: - DOCKERHUB_USERNAME (to create) - DOCKERHUB_TOKEN (to create) - DOCKERHUB_PASSWORD (to create, grrr, descriptions cannot be updated using PATs, see docker/hub-feedback#1927 (comment)) - GH_USERNAME (to create) - GITHUB_TOKEN (to use) 2. Autobuilds @ DockerHub to be disabled (this takes exactly on them)
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created or used: - DOCKERHUB_USERNAME (to create) - DOCKERHUB_TOKEN (to create) - DOCKERHUB_PASSWORD (to create, grrr, descriptions cannot be updated using PATs, see docker/hub-feedback#1927 (comment)) - GH_USERNAME (to create) - GITHUB_TOKEN (to use) 2. Autobuilds @ DockerHub to be disabled (this takes exactly on them)
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created or used: - DOCKERHUB_USERNAME (to create) - DOCKERHUB_TOKEN (to create) - DOCKERHUB_PASSWORD (to create, grrr, descriptions cannot be updated using PATs, see docker/hub-feedback#1927 (comment)) - GH_USERNAME (to create) - GITHUB_TOKEN (to use) 2. Autobuilds @ DockerHub to be disabled (this takes exactly on them)
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created or used: - DOCKERHUB_USERNAME (to create) - DOCKERHUB_TOKEN (to create) - DOCKERHUB_PASSWORD (to create, grrr, descriptions cannot be updated using PATs, see peter-evans/dockerhub-description#10 - GH_USERNAME (to create) - GITHUB_TOKEN (to use) 2. Autobuilds @ DockerHub to be disabled (this takes exactly on them)
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created: - DOCKERHUB_USERNAME - DOCKERHUB_TOKEN (write perms) - DOCKERHUB_PASSWORD, grrr, descriptions cannot be updated using PATs, see peter-evans/dockerhub-description#10 - GH_USERNAME 2. Autobuilds @ DockerHub to be disabled (this takes exactly on them)
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created: - DOCKERHUB_USERNAME - DOCKERHUB_TOKEN (write perms) - DOCKERHUB_PASSWORD, grrr, descriptions cannot be updated using PATs, see peter-evans/dockerhub-description#10 - GH_USERNAME 2. Autobuilds @ DockerHub to be disabled (this takes exactly on them) Remove old dockerhub hook, because now GHA is in charge of tagging.
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created: - DOCKERHUB_USERNAME - DOCKERHUB_TOKEN (write perms) - DOCKERHUB_PASSWORD, grrr, descriptions cannot be updated using PATs, see peter-evans/dockerhub-description#10 - GH_USERNAME 2. Autobuilds @ DockerHub to be disabled (this takes exactly on them) Remove old dockerhub hook, because now GHA is in charge of tagging.
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created: - DOCKERHUB_USERNAME - DOCKERHUB_TOKEN (write perms) - DOCKERHUB_PASSWORD, grrr, descriptions cannot be updated using PATs, see peter-evans/dockerhub-description#10 - GH_USERNAME 2. Autobuilds @ DockerHub to be disabled (this takes exactly on them) Remove old dockerhub hook, because now GHA is in charge of tagging.
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created: - DOCKERHUB_USERNAME - DOCKERHUB_TOKEN (write perms) - DOCKERHUB_PASSWORD, grrr, descriptions cannot be updated using PATs, see peter-evans/dockerhub-description#10 - GH_USERNAME 2. Autobuilds @ DockerHub to be disabled (this takes exactly on them) Remove old dockerhub hook, because now GHA is in charge of tagging.
First attempt to switch the automated building of moodle-php-apache images from DockerHub to GHA. Main reason being that the former doesn't support multiarch builds (only multiarch storage). Link: docker/hub-feedback#1874 Experimentally we'll be, also, sending the images to both DockerHub and GitHub registries in case we need to switch some day. This requires: 1. Some secrets to be created: - DOCKERHUB_USERNAME - DOCKERHUB_TOKEN (write perms) - DOCKERHUB_PASSWORD, grrr, descriptions cannot be updated using PATs, see peter-evans/dockerhub-description#10 - GH_USERNAME 2. Autobuilds @ DockerHub to be disabled (this takes exactly on them) Remove old dockerhub hook, because now GHA is in charge of tagging.
We are clearing up our old issues and your ticket has been open for 6 months with no activity. Remove stale label or comment or this will be closed in 15 days. |
Any updates on this? A list of known blockers? |
It's unlikely you'll hear anything back. This wouldn't be the first issue to go stale since they rarely address any of these issues. I'm relatively new to Docker but have learned that the best way to handle an issue is to simply "deal with it". Support is non existent. |
Any updates on this? A list of known blockers? |
The issue
Creating multiarch images is so hard, that only very big projects do it. Even those projects often use an outdated approach: special tag based instead of manifest based.
Possible solution 1
Add (experimental) support for buildx on Docker Hub. Adding it already as experimental feature has the following advantages:
If I understand things correctly this could work with the existing setup, using strategy 1: "Using the QEMU emulation support in the kernel".
Possible solution 2
Create examples on how to use
buildx
with the current Docker Hub (downloading and using it manually, via hooks).Background story
As a developer / devops I love Docker. Although one needs to learn a new set of knowledge about how Docker and related tools work, a whole class of other issues is abstracted away.
When I wanted to put a new open source project on Docker Hub, I was pleasantly surprised by automated Docker Hub builds:
Then I looked for settings about multiarch. They weren't there. I Googled on how to achieve this. I found that it was complicated to solve, and required quite some extra knowledge and setup.
It made me sad.
I really appreciate Docker and all the work being done to make it awesome. I understand that some things (like multiarch) are very complex, and I appreciate that you are working on hiding the complexity from the users.
The text was updated successfully, but these errors were encountered: