Hi,
I have few projects running on the Docker container. I have to build the docker image and send the image to the testing team for testing.
My requirement is to create the image build and then transfer it to another host without use of docker registry.
This is required as we have to give it to the testing team for testing.
Tell me the stpes for moving docker image to another host.
Thanks
Hi,
If you want to learn to transfer a Docker image created in one machine to another machine without using any repository in the process the this answer is for you.
You can create my own image in your computer and then you can transfer to another computer without using the repository.
Step 1: Create your image
You can to build your image with the command:
docker build -t myimage .
Step 2: Create tar of your image
Once your image is build successfully you can export to a tar file with following command:
docker save -o myimage.tar myimage:latest
Above command will create myimage.tar of your image.
Step 3: Copy tar to another host
Now you can copy the generated tar file to the host computer by scp or through network. You can use any method convenient to you.
Step 4: Load your tar file in host computer
In host computer you should have Docker already installed. If it is not install then first install docker.
You can use the following command to load your image on the host computer:
docker load -i myimage.tar
Above command will load docker image in your host computer. You can verify by running following command:
docker images
Hope above steps will help you.
Thanks
Ads