How do I transfer a Docker image from one machine to another one without using a repository, no matter private or public?
I am used to play and create my own image in VirtualBox, and when it is finished, I try to deploy to other machines to have real usage.
Since it is based on own based image (like Red Hat Linux), it cannot be recreated from a Dockerfile.
Are there simple commands I can use? Or another solution?
It seems save/export can achieve a similar purpose, see What is the difference between save and export in Docker?, and I prefer the save
command for my case.
You may use
sshfs
:You will need to save the Docker image as a tar file:
Then copy your image to a new system with regular file transfer tools such as
cp
orscp
. After that you will have to load the image into Docker:PS: You may need to
sudo
all commands.EDIT: You should add filename (not just directory) with -o, for example: