Last active
May 4, 2018 10:39
-
-
Save spirit11/1200dabdf0eb657d8dbdb47361d9a293 to your computer and use it in GitHub Desktop.
docker container training
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://gist.githubusercontent.com/spirit11/1200dabdf0eb657d8dbdb47361d9a293/raw/b4e6c16c501d0ac8d6b4327eee8c18c63514d8c9/registry.yaml > registry.yaml | |
docker stack deploy --compose-file registry.yaml registry | |
git clone --depth 1 https://github.com/jpetazzo/container.training.git | |
cd container.training/stacks | |
docker-compose -f dockercoins.yml build | |
docker-compose -f dockercoins.yml push | |
docker stack deploy --compose-file dockercoins.yml dockercoins |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
registry: | |
image: registry:2 | |
ports: | |
- "5000:5000" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker swarm init --advertise-addr eth0
TOKEN=$(docker swarm join-token -q manager)
for N in $(seq 2 5); do
DOCKER_HOST=tcp://node$N:2375 docker swarm join --token $TOKEN node1:2377
done
git clone git://github.com/jpetazzo/container.training
cd container.training/stacks
docker stack deploy --compose-file registry.yml registry
docker-compose -f dockercoins.yml build
docker-compose -f dockercoins.yml push
docker stack deploy --compose-file dockercoins.yml dockercoins