Skip to content

Instantly share code, notes, and snippets.

@eine
Last active June 17, 2019 12:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save eine/36eabe6a999728a96daf91d4e076f5f4 to your computer and use it in GitHub Desktop.
Save eine/36eabe6a999728a96daf91d4e076f5f4 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