How to copy a folder from docker to other folder?
RUN cp /data/ /data/db, this command does not copy the files in
Is there an alternate way to do this?
One Solution collect form web for “How to copy a folder from docker to other folder?”
It depends where
/data is for you: already in the image, or on your host disk.
Dockerfile RUN command execute any commands in a new layer on top of the current image and commit the results.
/data is the one found in the image as built so far.
/data on your disk.
If you want to copy from your disk to the image
/data/db folder, you would need to use
At runtime, when you had an existing running container, you could also use
docker cp to copy from or to a container.