Skip to content

Instantly share code, notes, and snippets.

@spirit11
Last active May 4, 2018 10:39
Show Gist options
  • Save spirit11/1200dabdf0eb657d8dbdb47361d9a293 to your computer and use it in GitHub Desktop.
Save spirit11/1200dabdf0eb657d8dbdb47361d9a293 to your computer and use it in GitHub Desktop.
docker container training
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
version: "3"
services:
registry:
image: registry:2
ports:
- "5000:5000"
@spirit11
Copy link
Author

spirit11 commented May 3, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment