A tiny CLI to import and export Docker volumes.
- Install the dependencies
bash>=4.0
(or at least a shell supporting bash)
Here are some usage examples.
Export a Docker volume to a directory
./docker-v \
-v volume_name \
-e
Export a Docker volume to a tarball
./docker-v \
-v volume_name \
-a output.tar.gz \
-e
Import a directory to a Docker volume
./docker-v \
-v volume_name \
-d input_dir -i
Import a tarball (then extract) to a Docker volume
./docker-v \
-v volume_name \
-d dir_path \
-a input.tar.gz \
-i
To get more informations about the CLI arguments, you can run ./docker-v -h
.