Skip to content

Commit

Permalink
Update docker_swarm
Browse files Browse the repository at this point in the history
  • Loading branch information
100daysofdevops authored Oct 24, 2019
1 parent bd26a06 commit fe81c47
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docker_swarm
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,17 @@ https://docs.docker.com/engine/reference/commandline/service_create/
# To create your own custom overlay network
$ docker network create --driver overlay myoverlaynetwork

# Create service using overlay network

docker service create --name myoverlay --network myoverlaynetwork --replicas 3 nginx

# You can also encrypt data exchanged between containers on different nodes on the overlay network

$ docker network create --opt encrypted --driver overlay my-multi-host-network

# Creating Swarm using Template
# Creating Service using Template

$ docker service create --name mytemplateservice --hostname="{{.Node.Hostname}}-{{.Service.Name}}" nginx

# Swarm Manager

Expand All @@ -106,7 +112,6 @@ docker node update --availability drain <NODE>

# Recover from losing the quorum


docker swarm init --force-new-cluster --advertise-addr node01:2377


Expand Down

0 comments on commit fe81c47

Please sign in to comment.