slimtoolkit / slimtoolkit/slim
slim succeeds, but image does not run
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 840
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
Container runs
Actual Behavior
Container does not run
Steps to Reproduce the Problem
This probably has to do with the container i made, but I am not sure where to start for debugging.
Specifications
- Version: 1.40
- Platform: running in gitlab, using docker in docker.
So a bit of background...
I have a web app build from:
php:8.1-apache-bullseye
I add a few extra packages, and I compile the php sqlsrv driver from Microsoft. Everything runs fine.
After a co-worker mentioned the app, I gave it a shot.
docker-slim build --http-probe=false --sensor-ipc-mode proxy my-tool:8.1-bullseye
(Also tried it with --http-probe=true and the --sensor-ipc-mode because it's running in DIND via gitlab.)
Succeeded! Beautiful, tiny, image!
However, when I try to test and deploy onto my server, the image immediately crashes. The logs in the container are simply:
mkdir: cannot create directory '/var/lock': File exists
If I change the --http-probe=true, I got a different error:
/bin/sh: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
im 100% sure this is to do with my container and my lack of understanding with your tool. But i am hoping someone can give me some guidance on steps to problem solve :D
Thank you!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported docker-slim build for the php:8.1-apache-bullseye image in the GitLab Docker-in-Docker setup, using the command and options in the issue. Compare the resulting container logs with the reported /var/lock and libc.so.6 errors; done means the slimmed image runs successfully in the stated deployment environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, gitlab, go, php
- Domain
- devops, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100