slimtoolkit / slimtoolkit/slim

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

Open
#312 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
23.4k
Forks
840
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing docker-slim optimization on OS X with an M1 chip using a linux/amd64 image, following the reported failure after HTTP probing. Investigate the platform mismatch in the optimization and build flow; done means amd64 images can be optimized successfully on arm64 Macs without the reported image-reference error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.