Deploying a Docker image on multiple docker hosts

Hi all,

I have created a docker image - An application of my own, say “mydockerimage”…
I have it in the local repository of my machine. Now I need to deploy or run this docker image as containers on two other machines connected to my computer which also have the docker engine installed. So its like, I have a network of 3 computers on each I have got docker engine installed. I have my image stored in one of those computers and I want to deploy the docker image on the other two machines connected via the network. How will I be able to achieve it?

Thanks

Three options:

(1) Check your Dockerfile and whatever you need to build the supporting artifacts into source control. (Which you’ve probably done already.) Check out the repository on the other systems and docker build it.

(2) docker save your image into a tar file and scp it to the other systems, where you can docker load it. (This is probably the most manual approach of the three, but requires the least infrastructure.)

(3) Set up a private registry. docker tag myimage registry.example.com/myimage; docker push registry.example.com/myimage. Then on your other systems, you can docker run registry.example.com/myimage and Docker will automatically pull it for you.

Thanks… :slight_smile: Well… I was thinking of using something like Docker Swarm to create a cluster first and then deploy the images to each one. But not sure how to work with it…`

Have you get Solution for this?? I am also having same problem …thanks in advance