Skip to main content

Transfer/Move a Docker Image

Using Export Command

Sample: osslab-dekiwiki

docker run -d -p 8880:80 \
-v /etc/localtime:/etc/localtime:ro \
-v $PWD/vol/data:/data \
-v $PWD/vol/var-lib-mysql:/var/lib/mysql \
-v $PWD/vol/var-log-httpd:/var/log/httpd \
-v $PWD/vol/var-log-dekiwiki:/var/log/dekiwiki \
-v $PWD/vol/var-www-dekiwiki-attachments:/var/www/dekiwiki/attachments \
-v $PWD/vol/var-www-dekiwiki-bin-cache:/var/www/dekiwiki/bin/cache \
--name $NAME \
osslab-dekiwiki \
/bin/bash

Run the instance in detach mode

docker run -it --detach --name osslab-mig osslab-dekiwiki

Export the image

docker export