Skip to content
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

Allow optimizing amd64 / x86 images on Mac M1 (arm64) #312

Open
sharq1 opened this issue Apr 12, 2022 · 3 comments · May be fixed by #316
Open

Allow optimizing amd64 / x86 images on Mac M1 (arm64) #312

sharq1 opened this issue Apr 12, 2022 · 3 comments · May be fixed by #316

Comments

@sharq1
Copy link

sharq1 commented Apr 12, 2022

Expected Behavior

That's likely a feature request, but I feel that docker-slim would gain much broader audience if it would allow Apple Silicon users optimizing intel-based images. Since I don't have access to linux and optimizing via virtual machine would be a pain I would really love that feature!


Actual Behavior

Getting this mid-optimization (after successful http probing)

...
Removing intermediate container bf0ab38c5a2f
 ---> 770b6f665177
Step 137/141 : ENV BUILD_ID "12345"
 ---> Running in bfd44e811f58
Removing intermediate container bfd44e811f58
 ---> b7b860e814d1
Step 138/141 : ADD files.tar /

cmd=build log='optimized.image.build' event=LOG.END tag='amd64-image-to-optimize.slim'  ====================
cmd=build info=build.error status='optimized.image.build.error' error='failed to get destination image "sha256:...": image with reference sha256:... was found but does not match the specified platform: wanted linux/amd64, actual: linux/arm64
cmd=build state=exited code=33554435 version=darwin|Transformer|1.37.5-4-gd3b7a36|d3b7a368ba1441a59a07284a082b608eeb6d28aa|2022-04-11_12:32:00 ...

Specifications

  • Version: docker-slim version darwin|Transformer|1.37.5-4-gd3b7a36|d3b7a368ba1441a59a07284a082b608eeb6d28aa|2022-04-11_12:32:00
  • Platform: OS X 12.2 on Macbook Air with M1 chip
@kcq
Copy link
Member

kcq commented Apr 13, 2022

@sharq1 already planning a number of related enhancements to the optimized image build logic :) will update the issue soon to share the ETA for it

@sharq1
Copy link
Author

sharq1 commented May 17, 2022

@kcq any update on this? I see a PR but it looks like it's stuck for some reason

@HansBambel
Copy link

This would indeed be amazing. Ran into the same error as @sharq1 when trying to optimize our Dockerfiles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants