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.

Copy to container

See original GitHub issue

The docker API shows that the docker cli can be used to copy files to and from containers, but the only command I can find in the API is for copying an archive off the container.

https://docs.docker.com/engine/reference/commandline/cp/

docker==2.5.1
docker-pycreds==0.2.1
Python 3.5.3
Client:
 Version:      1.12.6
 API version:  1.24
 Go version:   go1.7.4
 Git commit:   78d1802
 Built:        Tue Mar 14 09:47:15 2017
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.6
 API version:  1.24
 Go version:   go1.7.4
 Git commit:   78d1802
 Built:        Tue Mar 14 09:47:15 2017
 OS/Arch:      linux/amd64

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:7

github_iconTop GitHub Comments

7reactions
egelmexcommented, Oct 10, 2017

Are there any plans to match feature parity of docker cp? In my use case I am generating a single files that I wish to copy onto containers.

6reactions
shin-commented, Oct 9, 2017

Yes, put_archive and get_archive are the methods to use to copy to and from containers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
How to copy files from host to Docker container?
Docker cp command is a handy utility that allows to copy files and folders between a container and the host system.
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 >
Copying Files to and from Docker Containers - GeeksforGeeks
Step 1: Create a Docker Container. · Step 2: Create a File inside Container · Step 3: Get the Container ID · Step...
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