Last active
June 17, 2019 12:39
-
-
Save eine/36eabe6a999728a96daf91d4e076f5f4 to your computer and use it in GitHub Desktop.
Portainer and Traefik demo
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
#!/bin/sh | |
mkdir -pv traefik && cd traefik | |
printf "version: '2' \n\ | |
\n\ | |
services: \n\ | |
traefik: \n\ | |
image: traefik \n\ | |
restart: always \n\ | |
ports: [ '80:80', '8080:8080' ] \n\ | |
command: -c /dev/null --web --docker --docker.domain=docker.local \n\ | |
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ] \n\ | |
networks: [ 'net' ] \n\ | |
\n\ | |
networks: \n\ | |
net: \n\ | |
driver: bridge \n\ | |
" > docker-compose.yml | |
cat docker-compose.yml | |
docker-compose up -d | |
docker run -d --net traefik_net -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment