The easy way for migrating from archive file (*.tar.gz or *.tgz) to Docker volume
- First pull the Docker image
$ docker pull busthehero/archive2volume
- Run the image against volume you want archive file to be extracted upon
$ docker run --rm \
-v *archive file*:/tarfile/file.tgz \
-v *volume name*:/volume \
busthehero/archive2volume
- If you don't want Verbosity of container (originally generated from internal
tar -v
), you can useTAR_VERBOSE_FLAG
to disable it, by defining it to any value that is not literally "true" (default istrue
)
$ docker run \
... \
-e TAR_VERBOSE="" \
... \
busthehero/archive2volume
- You can use
TAR_EXTRA_ARGUMENT
to define additional arguments to internaltar
(default is--overwrite
)
$ docker run \
... \
-e TAR_EXTRA_ARGUMENT="--skip-old-files" \
... \
busthehero/archive2volume