I’m getting started using docker for somethings. I needed to move a container from a test machine to a new production home. This is how I did it. If there is a better way, please let me know!
I ran this where the machine was in development:
[code]sudo docker export container –output outfile.tar[/code]
on the destination machine I did the following:
sudo yum install docker
mkdir ~/containers && cd ~/containers
scp firstname.lastname@example.org:/path/to/outfile.tar .
sudo docker import outfile.tar reiners.io/test
sudo docker run –name imagename -ir reiners.io/test -p 9000:9000 bash –restart always
once you are done with that, you should be able to see your imported image listed:
sudo docker images ls
[justin@development images]$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
reiners.io/test latest 92e2e1eab9fe 58 seconds ago 1.13 GB