Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-slim throwing no such file or directory error. #369

Open
Somyarani13 opened this issue Aug 23, 2022 · 1 comment
Open

docker-slim throwing no such file or directory error. #369

Somyarani13 opened this issue Aug 23, 2022 · 1 comment

Comments

@Somyarani13
Copy link

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:
@kcq
Copy link
Member

kcq commented Aug 24, 2022

@Somyarani13 thank you for opening the issue! What kind of app do you have? Server or CLI app? What do your entrypoint and cmd instructions look like?

What happens when you use the --include-path parameter? That should be the right param to use if you want to keep extra files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants