Created
September 5, 2017 13:19
-
-
Save deviantony/1334299c49b76823ad45fad986faf2f4 to your computer and use it in GitHub Desktop.
Docker Swarm cluster setup with Docker in Docker
This file contains 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: "2" | |
services: | |
portainer: | |
image: portainer/portainer:latest | |
container_name: "portainer-app" | |
command: -H unix:///var/run/docker.sock | |
networks: | |
- portainer | |
volumes: | |
- /tmp/manager_run/docker.sock:/var/run/docker.sock | |
manager1: | |
image: docker:dind | |
privileged: true | |
hostname: manager1 | |
volumes: | |
- /tmp/manager_run:/var/run | |
networks: | |
- swarm | |
manager2: | |
image: docker:dind | |
privileged: true | |
hostname: manager2 | |
networks: | |
- swarm | |
worker1: | |
image: docker:dind | |
privileged: true | |
hostname: worker1 | |
networks: | |
- swarm | |
worker2: | |
image: docker:dind | |
privileged: true | |
hostname: worker2 | |
networks: | |
- swarm | |
networks: | |
portainer: | |
driver: bridge | |
swarm: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment