https://github.com/bfirsh/docker-export-volumes
A Docker image to export volumes from containers
https://github.com/bfirsh/docker-export-volumes
docker
Last synced: about 1 year ago
JSON representation
A Docker image to export volumes from containers
- Host: GitHub
- URL: https://github.com/bfirsh/docker-export-volumes
- Owner: bfirsh
- License: apache-2.0
- Created: 2014-07-17T22:47:19.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-08-06T20:45:17.000Z (almost 12 years ago)
- Last Synced: 2025-04-21T13:04:55.963Z (about 1 year ago)
- Topics: docker
- Language: Python
- Homepage:
- Size: 164 KB
- Stars: 16
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bfirsh/docker-export-volumes
============================
A Docker image to export volumes from containers running on the same host.
Pass it a container using `--volumes-from` and it'll output a tarball of the volumes from that container to stdout:
$ docker run --name mycontainer -v /data ubuntu touch /data/test
$ docker run --volumes-from=mycontainer -v /var/run/docker.sock:/var/run/docker.sock bfirsh/docker-export-volumes > volumes.tar
$ tar -tf volumes.tar
data/
data/test
Note: it only works on Docker hosts which listen on a UNIX socket because the image needs to access the host's remote API. In the example above, `/var/run/docker.sock` is injected into the container as a volume.