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
Attachments: docker-volumes.sh docker-export.sh
We do this for a living.
Kubernetes, DevOps and platform engineering, delivered in days — not another weekend lost to a stack trace.
Start a project →