Skip to content

Instantly share code, notes, and snippets.

@scfcode
Last active September 10, 2022 21:17
Show Gist options
  • Save scfcode/cb3e20f42829b732a2ddb367cf7cd03a to your computer and use it in GitHub Desktop.
Save scfcode/cb3e20f42829b732a2ddb367cf7cd03a to your computer and use it in GitHub Desktop.
Local Docker command lines #portainer

Portainer

docker volume create portainer_data

CE Version

docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

Switch to EE version

docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always
-v /var/run/docker.sock:/var/run/docker.sock
-v portainer_data:/data
portainer/portainer-ee:latest

nusa : Note I have

root@nusa:/home/scf/Containers/pi-hosted# pwd
/home/scf/Containers/pi-hosted
root@nusa:/home/sfs/Containers/pi-hosted# ls -l update_portainer_ee.sh
-rwxr-xr-x 1 sfs sfs 946 Sep 10 14:15 update_portainer_ee.sh
root@nusa:/home/scf/Containers/pi-hosted#

Notes on this setup

On one machine I had to configure Environments -> local -> public IP to the local host IP address; BTW this was on the EE ver.

Templates

https://raw.githubusercontent.com/portainer/templates/master/templates-2.0.json

https://raw.githubusercontent.com/SelfhostedPro/selfhosted_templates/master/Template/portainer-v2.json

Hiemdall Dashboard

docker volume create heimdall

docker run -d --name=heimdall -e PUID=1000 -e PGID=1000 -e TZ=america/los_angeles -p 8006:80 -p 406:443 -v heimdall:/config --restart unless-stopped linuxserver/heimdall

Running on Ubud

docker run
-p 8080:8080
-v /pool/guacamole:/config
maxwaldorf/guacamole

replaced by ...

docker run --name guacamole
-p 8070:8070
-v /pool/guacamole:/config \ abesnier/guacamole

UpTime Kuma

docker volume create uptime-kuma

docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1

Syncthing

mkdir Sync

docker run -d --restart=always --network=host -v /home/scf/Sync:/var/syncthing syncthing/syncthing:latest

Swarm

docker swarm join --token SWMTKN-1-5vqqwijqg5fosdlbhfaqyr0h0dknhg5c7ar0rlqw8ga9i97h9g-d8mdv2515k7xioce6uspmaj00 192.168.1.40:2377

docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION bb3dr0wv23jetmsvwr4tk1i8r * nusa Ready Active Leader 20.10.17
ql8k9abgtw7gtqdx1xk1d2eqg ubud Ready Active 20.10.17

Basic Install

https://docs.docker.com/engine/install/linux-postinstall/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment