Skip to content

Instantly share code, notes, and snippets.

@djbender
Created September 20, 2022 14:33
Show Gist options
  • Save djbender/75112d8f99b3697ff103b08b9270780b to your computer and use it in GitHub Desktop.
Save djbender/75112d8f99b3697ff103b08b9270780b to your computer and use it in GitHub Desktop.
Rename a docker volume via create/copy/rm
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