1

I have few docker images composed together in the stack using docker-compose.yml.

Now I want to transfer whole docker compose stack to the other host machine without uploading to the dockerhub, And deploy it on the docker swarm.

I saw there is a thing called docker compose bundle, would that help?

Mark O
  • 927
  • 9
  • 13

2 Answers2

3

If you’re deploying on a multi-host swarm (or something similar like Kubernetes or Nomad) you all but need a Docker registry. It doesn’t specifically have to be Docker Hub — quay.io, Amazon’s ECR, Google’s GCR, and self-hosted registries all work fine — but you do need to have pushed the built images somewhere where the orchestrator can retrieve them by name.

I’ve never used docker-compose bundle myself, but its documentation also notes that its operation “requires interaction with a Docker registry”.

The only real alternative is using docker save and docker load to manually move images between machines, but as a manual process it will get tedious very quickly, and you need to make sure an identical set of images are on every machine for consistency. Using a registry will be vastly easier.

David Maze
  • 130,717
  • 29
  • 175
  • 215
0

The easyest way to do it is to use a Docker registry. The problem with Docker Hub is that you can only have one private registry, the rest must be public or paid.

Thankfully, there are other (free) alternatives:

  1. Deploy your own private registry. Here is a nice tutorial where you can try it in the browser.

  2. Use a free private registry. I personnaly use Codefresh. It can automatically build your image from a private repo (like bitbucket who has free plan too), but you can also just use it like a "simple" docker registry and push and pull your Docker images there.

OLIVIER
  • 858
  • 9
  • 18