Docker Swarm Commands

Create a service with an image in a private registry

These instructions will pass the login token from your local client to the Docker Swarm nodes, so those are able to log into the registry and pull the image.

# Save the Docker Registry password in the PASSWORD environment variable 

# Log into the Docker Registry
echo $PASSWORD | docker login -u [user] --password-stdin

# Create the service
docker service create \
  --with-registry-auth \
  --name my_service \

Leave a comment

Leave a Reply