Created
September 20, 2022 14:33
-
-
Save djbender/75112d8f99b3697ff103b08b9270780b to your computer and use it in GitHub Desktop.
Rename a docker volume via create/copy/rm
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
docker volume create --name <new_volume> | |
docker run --rm -it -v <old_volume>:/from -v <new_volume>:/to alpine ash -c "cd /from ; cp -av . /to" | |
docker volume rm <old_volume> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment