question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there a way to copy files/directories into a container?

See original GitHub issue

Hi,

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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
zbyte64commented, Jun 27, 2016

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!

3reactions
mschnitzercommented, Apr 6, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found