slimtoolkit / slimtoolkit/slim

docker-slim doesn't work on macos aarch64 (arm on m1) with an aarch64 docker image

Open
#213 14 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Expected Behavior

Run docker-slim against an aarch64 docker image, it runs.


Actual Behavior

Fails to run... log message:

cmd=build info=event.error status='received' data='SensorError{Op:sensor.fanotify.Run/fanapi.Initialize,Kind:call.error,Wrapped:{Type=syscall.Errno,Info=function not implemented,Line:43,File:github.com/docker-slim/docker-slim/pkg/app/sensor/monitors/fanotify/monitor.go}}'

The issue I think is that there is no arm build of docker-slim-sensor?


Steps to Reproduce the Problem

  1. install using brew (or zip)
  2. run docker-slim on an aarch64 image

Specifications

  • Version: latest
  • Platform: macos aarch64

Fix (build it yourself)

  • git clone git clone git@github.com:docker-slim/docker-slim.git
  • cd docker-slim
  • GOOS=linux go build -o /usr/local/bin/docker-slim-sensor cmd/docker-slim-sensor/main.go

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 with cmd/docker-slim-sensor/main.go and pkg/app/sensor/monitors/fanotify/monitor.go, then reproduce the failure on macOS aarch64 with an aarch64 image. Compare this with building the sensor using GOOS=linux go build and determine the required architecture-specific build or behavior. Done means docker-slim runs successfully against the reported image without the fanotify initialization error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.