mirror of
https://github.com/gdiepen/docker-convenience-scripts.git
synced 2025-03-09 19:20:25 +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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue