slimtoolkit / slimtoolkit/slim
docker-slim throwing no such file or directory error.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 840
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
I am building a docker image(not slimmed) and then build the slim image using the non-slim image.
Command used to build the slim image is
docker-slim build --target slim_image --expose 5000
It generates the slim image but when trying to create a container for the given slim image, it throws
no such file or directory :- usr/local/lib/python3.8/site-packages/pydicom/data/urls.json
For finding the issues, I tried creating a container for the slim image and check in the container if the given path is present or not . But there is no urls.json present inside data folder.
I also tried creating a container for the non-slim image and check in the container if the given path is present or not. And urls.json was present inside the data folder.
So I wen through the flags of build command of docker slim and found --preserve-path-file and i gave the absolute path of the urls.json. But somehow it looks as if the urls.json is looking out for this file in the machine on which this docker image and containers are working and not inside the non-slim docker image.
Command which I even tried with --preserve-path-file is
sudo docker-slim build --target non_slim_image_name --expose 5000 --preserve-path-file usr/local/lib/python3.8/site-packages/pydicom/data/urls.json
sudo docker-slim build --target non_slim_image_name --expose 5000 --include-path-file usr/local/lib/python3.8/site-packages/pydicom/data/urls.json
Actual Behavior
Steps to Reproduce the Problem
Specifications
- Version:
- Platform:
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 with the docker-slim build commands and compare the non-slim and slim images at /usr/local/lib/python3.8/site-packages/pydicom/data/urls.json. Check how --preserve-path-file and --include-path-file handle this path, then reproduce the missing-file error with the supplied image-building flow. Done means the slim image retains the required file or the issue documents the supported limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100