slimtoolkit / slimtoolkit/slim

how to keep shell environment included with slim

Open
#716 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Expected Behavior

keep shell env after slim build


Actual Behavior

we run with shell include as:
docker-slim --report /root/slim.report.json build
--http-probe=false
--continue-after=1
--include-shell=true
--include-oslibs-net=true
--include-ssh-client=true
ndsmodeler:20240914
the contiainer seems still missing the shell environment.
[root@localhost ~]# docker exec -it caf51e6fff9d /bin/bash
OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown
[root@localhost ~]# docker exec -it caf51e6fff9d /bin/sh
OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/sh": stat /bin/sh: no such file or directory: unknown
[root@localhost ~]# docker exec -it caf51e6fff9d sh
OCI runtime exec failed: exec failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown
how can we keep the shell environment and basic os commands? the base image is CentOS Stream 8

Specifications

  • Version: 1.40.11
  • Platform: centos stream 8

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 1.40.11 build command with --include-shell=true on the CentOS Stream 8 image, then inspect the resulting container with /bin/bash, /bin/sh, and sh. Done means the documented shell environment and requested basic OS commands remain available after slimming.

Written by the indexing model from the issue text.

Assessment

Tech stack
centos, docker, shell
Domain
devops, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.