Skip to content

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

@sharq1

Description

@sharq1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions