Am I missing something when I try to copy files from one folder to a existing container folder:
I want to copy files within the build(host) folder to html in my container:
docker cp ./src/build b081dbbb679b:/usr/share/nginx/html
To be clear; I need to copy from host to container.
But it copies the whole build folder and copies it to ..html/build
I just need the files(and sub folders) within the build folder to be copied into ..html.
Am I missing something or do I have to copy each file one by one?
Copy files/folders between a container and the local filesystem is like below formats:
Copy file to folder inside container:
above example shows
index.html
file is copying toapp
folder inside containerCopy all files to folder inside container:
above example shows all files inside
build
folder are copying toapp
folder inside containerHere is the explanation on how to use the CP command in docker, which will fix your issue with
/.
in end ofSRC_PATH