-
Notifications
You must be signed in to change notification settings - Fork 268
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
[Docker Engine] Add multi-platform image support (migrate to the containerd content store and snapshotters) #371
Comments
The containerd image store feature is now in beta in Docker Desktop 4.12.0 🎉 We’d love to hear from you! Please feel free to provide us feedback or report any bugs you may find through the issues tracker on the feedback form. |
Building with
Using
Can you explain what is supposed to happen here and why following the instructions does not work? |
Which instructions were you following? https://docs.docker.com/desktop/containerd/#building-multi-platform-images ? There's not really that much detail in your comment, I'd suggest opening a Docker Desktop bug report for the failure you're seeing, and hence (by populating the issue template) including details like the commands you ran, the Dockerfile, and the versions of the various components in-use. I suspect that something in your configuration (the use of the buildx Docker container driver, perhaps) is incompatible with the containerd image store for the Docker component versions currently installed, and hence guess that you will need to manually upgrade to buildx 0.10 and/or wait for a new release of Docker Desktop to include buildx 0.10 and hence BuildKit 0.11, which I think fixes this particular incompatibility. To be clear, that's several guesses stacked together, so I still recommend opening a new bug report for the problem with all the details on the likely chance I'm giving incorrect or faulty suggestions. |
These instructions:
So, I append
|
Okay, if you weren't following a specific tutorial (sorry, I misunderstood) then the answer is there in the output: If using the docker-container driver, you must provide either Basically, you've hit docker/buildx#59 (comment). I still guess that the fix is to enable both the containerd content store beta (as you are) so that manifest lists can be stored and also the newer version of buildx I mentioned earlier, which knows how to store manifest lists in Docker. (Note: I have not tested this, just looked at some PRs) |
Does any version of buildx support multi-platform exports with the beta containerd store? My understanding is that exporting an image to |
Drat. That's why it was a guess. 🐍👀. My guess was based on moby/buildkit#3389 having been merged for BuildKit 0.11, and BuildKit 0.11 having been vendored into buildx 0.10. However, on closer inspection, it (and moby/buildkit#3380 which is how I got there) are not solving this issue, but were preventing the same error message being triggered by other changes. So I guess there's still some work to go in buildx to be able to push a manifest list via the Docker exporter ( I wasn't able to find an open issue tracking this: docker/buildx#59 was the first one, and it was closed by documenting the limitation with a direction towards this roadmap issue as the blocker. docker/buildx#166 is also close, but it is related to the Again, it's possible that a specific tracking issue exists, and I just failed to locate it. If I'm reading this correctly, then BuildKit would also reject And just to clarify, this is only affecting the |
Excellent write-up @TBBle, thanks! So, just for the record, this is the current setup:
And the failing command is:
|
The only other thing I'd suggest, in order to validate one of my assumptions, is the output of
Depending on the details of your setup and Dockerfile,
might work, but I don't know for sure. The It also might be possible replace |
Both |
Thought I should probably make some effort on my own behalf. On a reset-to-defaults and then containerd-beta-activated Docker Desktop for Windows:
So looks like the So to recreate the observed issue:
indeed produces
and adding
and then trying the workaround:
produces the following error:
which is hitting this code from here, as the next expected line was "sending tarball". So either this code-path is not yet implemented, or I've done something that broke it. (I'm not sure which code is "the client" here, my guess is buildx, and maybe it's doing something specifically in The same error happens if you use a single platform with And for sanity, actually adding a filename for all the following cases exports fine, so the limitation is specifically for loading back into Docker automatically.
And interestingly, the output of all three appears to work with So in the end, a workaround for
appears to work in Git Bash (MSYS2) but not Powershell 7.3.0; some kind of unclean binary pipeline going on in the latter, I fear. ( Bonus edit: The redirect thing is a Windows platform (or Windows buildx build) issue, as
doesn't suffer this issue. |
Oh, with |
Based on my last batch of testing, I went ahead and opened docker/buildx#1522 for #371 (comment) and ensuing discussion, since it looks like all the plumbing is there in BuildKit and Docker for something like |
Issue #, if available: runfinch/finch#492 *Description of changes:* In order to facilitate Finch on Windows, we need a root filesystem. We will use this Dockerfile as a basis for that root filesystem - using `docker export` to turn a built container into an archived rootfs. For the scope of these changes, create the Dockerfile and an action that runs on changes to the file to build and push to ECR repo. The Dockerfile will be used to create a container such that we can export that container's fs as a tarball and compress it for use with WSL2. For now, we are including cloud-init (at least for the WSL2 rootfs) but need further investigation to determine if we can remove the package to further slim the rootfs.. In order to create the container used as an intermediate step to export its rootfs, we need to tell buildkit to load the image into Docker. See This exposes a limitation of buildkit to load multiplatform images: `buildx failed with: ERROR: docker exporter does not currently support exporting manifest lists` thus why the action runs two build-rootfs-image jobs - one for each arch. See docker/buildx#59 and docker/roadmap#371 Additionally, network performance of the arm64 build is quite slow - downloads of packages via dnf are on the scale of kb/s (but this has not been observed on Ubuntu or Alpine images) *Testing done:* Local copy in a private repo, [`act`](https://github.com/nektos/act) - [X] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Gavin Inglis <giinglis@amazon.com>
I am compiling x86 on my M2 machine, and I enabled containerd on Docker. |
@zhixinwen The containerd backend for Docker is still considered experimental, so I'm afraid that's likely an issue with Docker for Mac. |
Any updates here? |
What's the timeline until we will be able to use multi-platform builds using |
Containerd image store support is now generally available with the release of Moby 25 (shipped in DD 4.27). There will be a blog post that covers the DD 4.27 soon. Docs can be found at https://docs.docker.com/desktop/containerd/. |
Looking forward to additional documentation because the link did not work with containerd and SBOM enabled:
|
hi @NiklasBr. From your
|
Assuming there were more lines to that error
then it appears your docker buildx doesn't believe you're using the containerd image store. If no such lines appeared, then I have no idea what version of buildx you're using, but I can't see any way in the buildx 0.12.1 release to generate that error without those extra lines, and 0.11 and older had different phrasing for that error. I just upgraded my Docker Desktop to 4.27.1 (I already had the containerd image store enabled from the beta), and trivially built the container from https://docs.docker.com/get-started/02_our_app/ using the given command:
and it appears to have worked as expected:
|
Tell us about your request
Docker started the containerd project with the plan for the Docker Engine to be migrated to use it. The Docker Engine already uses containerd to manage container lifecycle but it still uses its own implementation for image and filesystem management.
Docker is working with the Moby project contributors on completing the migration and moving Docker Engine to use containerd's content store and snapshotters. This will enable low-level features like multi-platform image support. It will also reduce the code complexity of the Docker Engine.
Which service(s) is this request for?
Docker Engine which is a core part of Docker Desktop and Docker for Linux.
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
There are many user facing features that this will enable. To list a few:
The text was updated successfully, but these errors were encountered: