Seng Foong
Seng Foong

Reputation: 111

Docker swarm service create

I am new to Docker Swarm. I am wondering if is it possible to add my own build image to the docker service create command?

For example, I have created an image called testing and I run the following cmd "docker service create [OPTIONS] testing".

Thank you and sry for my broken English.

Upvotes: 0

Views: 88

Answers (1)

trallnag
trallnag

Reputation: 2386

Yes, it is possible. See this documentation here for the docker service create command.

But the image you want to use must be accessible from the Docker swarm. The standard approach here is to upload the image to the Docker Trusted Registry that should be running alongside the Docker swarm, or have the image uploaded to another registry available to the Swarm. This of course only matters when you are working with a production deployment of Docker swarm with multiple nodes and so on. A local swarm on your own machine can use the same images you can use with docker run.

Upvotes: 1

Related Questions