2

Is it possible to add files from local file system to a running docker container? Or I need to stop the container and add the files using cp command and run the container again?

2
  • 2
    Please check this answer: stackoverflow.com/questions/22907231/… Commented Dec 19, 2017 at 8:54
  • Yes this is a duplicate question. See link by @user3217526 above Commented Dec 19, 2017 at 10:23

1 Answer 1

1

Try docker cp.

To put files on a container:

docker cp file.pdf container:/file.pdf

To get files from a docker container:

docker cp container:/file.pdf file.pdf
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.