source: https://docs.portainer.io/start/install/server/docker/linux With some modifications
1
2
3
4
5
6
7
#!/bin/bash
sudo docker volume create portainer_data
sudo 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
IP=$(hostname -I | cut -d " " -f 1)
echo "Now log into https://$IP:9443"