Skip to content

Instantly share code, notes, and snippets.

@sbusso
Forked from eine/portainer_traefik_demo.sh
Created February 4, 2018 16:01
Show Gist options
  • Save sbusso/d4214d9c750a159477483226b426e5e9 to your computer and use it in GitHub Desktop.
Save sbusso/d4214d9c750a159477483226b426e5e9 to your computer and use it in GitHub Desktop.
Portainer and Traefik demo
#!/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