Created
August 26, 2021 22:06
-
-
Save ignaciolg/82adbc404487726dca4398f75ffa9a1e to your computer and use it in GitHub Desktop.
Update Portainer to latest + add port label for traefik
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
#!/bin/sh | |
docker ps | grep -i portainer | |
CONTAINER=`docker ps | grep -i portainer | awk '{print $1}'` | |
docker stop $CONTAINER | |
docker rm $CONTAINER | |
docker run --label traefik.http.services.Portainer.loadbalancer.server.port=9000 -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment