Is there a way to copy files/directories into a container?
See original GitHub issueHi,
I read your the documentation about docker-py
but it seems that there is no way to copy something into a container, right? That’s a feature what I’d really like and need.
If there is a different way to do so, please tell me. Temporarily, I stick with a simple shell command execution.
PS: If this is the wrong place to ask for something, please tell me where I can ask questions since I tried to join your channels on freenode, but it seems I must get the Developer
-Status to join.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How to copy files from host to Docker container?
The cp command can be used to copy files. One specific file can be copied TO the container like: docker cp foo.txt container_id:/foo.txt....
Read more >docker cp - Docker Documentation
The docker cp utility copies the contents of SRC_PATH to the DEST_PATH . You can copy from the container's file system to the...
Read more >Copying Files To And From Docker Containers - Baeldung
Another way to copy files to and from Docker containers is to use a volume mount. This means we make a directory from...
Read more >How to Copy Files with Docker cp to your Docker Container
Copying Files with the docker cp Command · 1. Open a terminal on your local machine. · 2. Create a file named myfile....
Read more >How to copy files from host to Docker container? - Tutorialspoint
Another way to copy files from host to container is by mounting a directory from the host machine to the Docker container while...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is a gist of what I do to put a password file into a container:
https://gist.github.com/zbyte64/6800eae10ce082bb78f0b7a2cca5cbc2
Hope it helps!
OK, I found
put_archive
as an option, but I don’t understand why it’s better to specify a TAR archive? Don’t want to pack a 429 Bytes file into an archive.