Last active
April 9, 2023 09:39
-
-
Save LapsTimeOFF/ac71c71f38e59f971d391e9452641b38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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