slimtoolkit / slimtoolkit/slim

Master app fails to create a new docker image due to restricted file permissions on the image files (workaround exists)

Open
#73 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Reported by Danesh ( @dforouhari ):

  1. I am logged with my uid (dforouhari)
  2. docker-slim failed with/at

docker-slim[build]: state=building message='building minified image' time="2019-03-19T16:45:56-07:00" level=fatal msg="docker-slim: failure" error="no permission to read from '/home/dforouhari/3rd _party_src/dist_linux/.images/752f8eea14330275ff2c3e1611f7db98cc13cfa9c9cc635b6970a7afb0f113e3/artifacts/files/root/.ssh/id_rsa '" stack="goroutine 1 [running]:

[dforouhari@artifacts]$ pwd
/home/dforouhari/3rd_party_src/dist_linux/.images/752f8eea14330275ff2c3e1611f7db98cc13cfa9c9cc635b6970a7afb0f113e3/artifacts [dforouhari@artifacts]$ ls -lt
total 96
-rw-r--r-- 1 dforouhari dforouhari 176 Mar 19 16:45 Dockerfile
-rw-r--r-- 1 dforouhari dforouhari 3700 Mar 19 16:45 img_demo-seccomp.json
-rw-r--r-- 1 dforouhari dforouhari 3089 Mar 19 16:45 img_demo-apparmor-profile
-rw-r--r-- 1 root root 81795 Mar 19 16:45 creport.json
#Question is the uid/gid root what u expect?
drwxr-xr-x 10 root root 101 Mar 19 16:45 files
#Question is the uid/gid root what u expect?
-rw-r--r-- 1 dforouhari dforouhari 2691 Mar 19 16:44 Dockerfile.fat

Here is the perm on the specific file that docker-slim complained about
[dforouhari@artifacts]$ ls -l
/home/dforouhari/3rd_party_src/dist_linux/.images/752f8eea14330275ff2c3e1611f7db98cc13cfa9c9cc635b6970a7afb0f113e3/artifacts/files/root/.ssh/id_rsa
-rw------- 1 root root 1675 Mar 19 16:44

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 the docker-slim build failure using the reported artifacts/files/root/.ssh/id_rsa path and its root-only permissions. Trace how the image files are created and read, then establish whether root ownership is expected and what supported outcome should be verified for a non-root user.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.