Last active
June 27, 2023 11:16
-
-
Save FrankFang/86657d8e9d6cb4872b71255f0a3c8999 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
# https://www.docker.com/blog/back-up-and-share-docker-volumes-with-this-extension/ | |
# run in host | |
mkdir repos | |
mkdir config | |
docker run -it -v repos:/repos -v config:/config -v "$(pwd)/repos":/outside_repos -v "$(pwd)/config":/outside_config busybox sh | |
# run in container | |
cd /repos | |
find . -name node_modules -type d -exec rm -rf {} \; | |
find . -name dist -type d -exec rm -rf {} \; | |
find . -name tmp -type d -exec rm -rf {} \; | |
find . -name cache -type d -exec rm -rf {} \; | |
du -sh | |
cp -r * /outside_repos | |
cd /config | |
cp -r * /outside_config | |
cp -r .??* /outside_config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment