Forum Navigation
You need to log in to create posts and topics.

Docker commit and export latest version of container

Problem

User wants to save latest changes and move container to a different machine

Solution

sudo docker commit --change "Latest Version to export" container-name container-name:v2
sudo docker save container-name:v2 > container-name.tar

 

 

Attached scripts to export containers and assigned volumes

Solution

edit docker-export.sh and change the following parameters

# Container name to export
NAME=container-name
# Username of the remote host to copy
USER=username
# Host to copy the exported container
HOST=newhost
# New version for the container
VERSION=2

run the following command

./docker-export.sh export

 

 

 

 

Uploaded files: