"docker cp" all files from a folder to existing container folder - Stack Overflow

Ask questions Research chat →

https://stackoverflow.com/questions/32566624/docker-cp-all-files-from-a-folder-to-existing-container-folder · scraped

terminal

Attachments

Scraped Content

— 109 words · 2026-02-14 17:42:00 UTC ·

Excerpt

- Copy file to folder inside container: ```plain text docker cp ./src/build/index.html ContainerName:/app/ ``` above example shows index.html file is copying to app folder inside container - Copy all files to folder inside container: ```plain text docker cp ./src/build/. ContainerName:/app/ ``` above example shows all files inside build folder are copying to app folder inside container Just use "." (Dot - instead of "*" in Linux) after your file path, it will copy entire files from the folder docker cp /file/path/* containerId:/filepath/nginx/html/ ```plain text docker cp /file/path/. containerId:/filepath/nginx/html/ ``` ## Your Answer ## Not the answer you're looking for? Browse other questions tagged docker or ask your own question.
- Copy file to folder inside container: ```plain text docker cp ./src/build/index.html ContainerName:/app/ ``` above example shows index.html file is copying to app folder inside container - Copy all files to folder inside container: ```plain text docker cp ./src/build/. ContainerName:/app/ ``` above example shows all files inside build folder are copying to app folder inside container Just use "." (Dot - instead of "*" in Linux) after your file path, it will copy entire files from the folder docker cp /file/path/* containerId:/filepath/nginx/html/ ```plain text docker cp /file/path/. containerId:/filepath/nginx/html/ ``` ## Your Answer ## Not the answer you're looking for? Browse other questions tagged docker or ask your own question.

Visibility

Visible to everyone

Reading Status

Related Bookmarks

My Note


Saved!

Annotations

Export as Markdown
+ Annotate selection

Add Annotation