New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moving a file from the host system to a container #905
Comments
Hi, For now insert only takes distant URL not local, like The thing you are trying to do can be done in a docker file with the This will be changed soon. |
@crosbymichael this is solved by "docker cp" right? |
@shykes no, cp does a copy from a contain to the host. It would not be too difficult to allow you to copy both ways with I'm sure I could implement this just in time for 0.6 ;) |
I'll leave you judge of what should go higher in the list for 0.6. Just make sure to optimize for what people need :) On Tue, Aug 13, 2013 at 2:55 PM, Michael Crosby notifications@github.com
|
Any update on that? Thanks |
yeah, i would be interested in that as well, cp should work bi-directional |
+1, having |
Having a command to inject files into an image locally would help a lot. Beginners can start without having to write a Dockerfile to be able to perform this. |
👍 Would love to have this functionality. |
+1, having docker cp support host-to-container copies solves a lot of problems and keeps the command line api simple and predictable. |
+1 would like to see this as well. |
ping @crosbymichael |
Not the ideal solution, but one can use "docker run -v /hostMountPoint:/containerMountPoint ..." to copy files across. |
Yes, that is the workaround I have been using as well. In fact, I have On Fri, Nov 8, 2013 at 6:14 AM, Lilian notifications@github.com wrote:
|
I solved this by adding sshd to my containers then using rsync to update the files. |
@janinl hello could you please explicit this docker run -v command ? what if I want to copy my.file from the host current directory to the i /opt/ directory of the image named 'base' ? |
nevermind, I found it : if I want to copy license.key in the host's /home/vagrant to the container's /opt here is the line : |
one trick I used recently to avoid restarting the container was netcat "nc" in the container: nc -l 10101 > thefile.bin I then do sha1sum in both places to make sure it arrived ok... |
@sunnygleason great tip |
I would love to see a scp-like syntax for |
+1 for scp |
@sunnygleason. Thanks. I would also +1 for scp. |
@crosbymichael Any update on this one ? Maybe a few pointers about how to implement it if someone feels like it ? I would love to be able to have HAProxy or Nginx reload its configuration (which would be injected prior to the reload by |
+1 |
2 similar comments
+1 |
+1 |
+1 PLEASE |
@marcellodesales issue: #5846 |
+1 |
Yes! +1 |
+1 |
1 similar comment
+1 |
seriously... more than a year, and the feature is not there? +1 |
+1 =( |
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
With |
Yay!!! finally. Version 1.3.0 New command: docker exec The new docker exec command lets you run a process in an existing, active container. The command has APIs for both the daemon and the client. With docker exec, you'll be able to do things like add or remove devices from running containers, debug running containers, and run commands that are not part of the container's static specification. Details in the command line reference. |
Awesome!! |
finally I got to patch my bashes, i was putting it off forever |
copy life folder life into container 5e1ce281984a |
You can copy files with
|
Actually, the latest docker has support for "docker cp" from host into On Sat, Aug 8, 2015 at 11:26 PM, Rafał Rzepecki notifications@github.com
|
How can I copy a file or directory from my HOST /home/myself to an active running container like containername = test1? ok sorry for that |
i'm trying to copy .bak file (10 gb) from host to container using docker cp command but it never completed in mac system .Any solution |
I want to move a file from the host file system to a container. How do I do this?
I tried
docker insert
, but there doesn't seem to be much documentation on it, and it doesn't appear to support copying local sources. Both of these commands didn't insert anything into/root
:...or return any indication or error for that matter. Also tried feeding the contents in from stdin, like so:
But that didn't work either.
The text was updated successfully, but these errors were encountered: