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?
Asked
Active
Viewed 3,257 times
2
-
2Please check this answer: https://stackoverflow.com/questions/22907231/copying-files-from-host-to-docker-container – user3217526 Dec 19 '17 at 08:54
-
Yes this is a duplicate question. See link by @user3217526 above – Bernard Dec 19 '17 at 10:23
1 Answers
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

Alfonso Tienda
- 3,442
- 1
- 19
- 34