mirror of
https://github.com/gdiepen/docker-convenience-scripts.git
synced 2025-01-18 10:08:55 +00:00
Copy labels for volume
Docker-compose created named volumes use labels. It may also usefull to copy all metadata for a volume copy.
This commit is contained in:
parent
fd6535b616
commit
408d5a1a2d
@ -40,7 +40,7 @@ fi
|
||||
|
||||
|
||||
echo "Creating destination volume \"$2\"..."
|
||||
docker volume create --name $2
|
||||
docker volume create --name $2 $(docker volume inspect $1 --format '{{range $k,$v:=.Labels}}--label {{$k}}={{$v}} {{end}}')
|
||||
echo "Copying data from source volume \"$1\" to destination volume \"$2\"..."
|
||||
docker run --rm \
|
||||
-i \
|
||||
|
Loading…
Reference in New Issue
Block a user