-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
docker cp seems to be limited to the root/default volume, as confirmed on IRC:
$ cat Dockerfile
FROM ubuntu:precise
MAINTAINER Benjamin Podszun "[email protected]"
VOLUME /some/volume
RUN touch /some/volume/I_Want_To_Copy_This
CMD /bin/bash
$ docker build .
Uploading context 10240 bytes
Step 1 : FROM ubuntu:precise
Pulling repository ubuntu
---> 8dbd9e392a96layersfrom ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/
Step 2 : MAINTAINER Benjamin Podszun "[email protected]"
---> Using cache
---> c950832bf997
Step 3 : VOLUME /some/volume
---> Running in f9b8fc1901f2
---> 56106cf843d5
Step 4 : RUN touch /some/volume/I_Want_To_Copy_This
---> Running in 31eca80e094d
---> 2cb2858fedee
Step 5 : CMD /bin/bash
---> Running in af26bafd07ba
---> 4e0f6538a826
Successfully built 4e0f6538a826
$ docker run -i -t 4e0f6538a826
root@d787a64f78f9:/#
$ docker cp d787a64f78f9:/some/volume/I_Want_To_Copy_This .
2013/09/24 17:12:11 Error: stat /var/lib/docker/containers/d787a64f78f94e88abcdda2c8224c3ecfface23d783c4308f08ef1a3367d2ae1/rootfs/some/volume/I_Want_To_Copy_This: no such file or directory