Skip to content

Instantly share code, notes, and snippets.

@LapsTimeOFF
Last active April 9, 2023 09:39
Show Gist options
  • Save LapsTimeOFF/ac71c71f38e59f971d391e9452641b38 to your computer and use it in GitHub Desktop.
Save LapsTimeOFF/ac71c71f38e59f971d391e9452641b38 to your computer and use it in GitHub Desktop.
mkdir $1; tar -xf $2 -C ./$1
docker volume create $1
docker run --rm -v $PWD/$1:/volume --mount source=$1,target=/data busybox cp -r /volume/. /data/
docker run --rm -v $1:/data busybox ls /data
rm -rf $1
# How to use it?
# curl https://gist.githubusercontent.com/LapsTimeOFF/ac71c71f38e59f971d391e9452641b38/raw/d2f9caa35580067646443041310a1c9fde842f58/archiveToDockerVolume.sh > script.sh; sh script.sh volume_name archive.tar.zst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment