Hi Guy,
at first: a persistent volume in docker is not the same as virtual volume in a vm. its not an iso / file that can easily be "shipped".
to export/ship/import a volume you can go through the following steps (docker as root and same docker host OS - remember to set you env varas correct if running db2 in docker on windows):
1) Export to a tar archive (
<MyDb2SourceContainer> should be stopped already)
docker run --rm --volumes-from <MyDb2SourceContainer> -v $(pwd):/backup busybox tar cvf /backup/backup.tar /database
2) transfer you backup.tar to target machine
3) create (not run) new db2 container with new volume (instance user and dbname has to be the same as in source image -> db2inst1)
docker create -v <mynewvolume>:/database --name <MyNewDb2Container> ..... ibmcom/db2:latest
4) import tar archive to new volume
docker run --rm --volumes-from <MyNewDb2Container> -v $(pwd):/backup busybox tar xvf /backup/backup.tar
database/
5) start db2 container
docker start <MyNewDb2Container>
------------------------------
Markus Fraune
------------------------------