run.sh 735 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # docker run -d \
  3. # -v /var/run/docker.sock:/var/run/docker.sock \
  4. # -v /mnt/portainer/:/data \
  5. # -l "traefik.frontend.rule=Host:portainer.bodicsek.host" \
  6. # -l "traefik.enable=true" \
  7. # --name portainer \
  8. # portainer/portainer:latest
  9. docker service create \
  10. --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
  11. --mount type=bind,source=/mnt/portainer,target=/data \
  12. --network traefik-net \
  13. --name portainer \
  14. --constraint "node.role==manager" \
  15. --label traefik.frontend.rule=Host:portainer.bodicsek.host \
  16. --label traefik.port=9000 \
  17. --label traefik.enable=true \
  18. portainer/portainer:latest