2023-05-02 03:13:37 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
2023-05-03 05:13:28 +00:00
|
|
|
PORTAINER_DATA=${PORTAINER_DATA:-/tmp/portainer}
|
|
|
|
PORTAINER_PROJECT=${PORTAINER_PROJECT:-$(pwd)}
|
|
|
|
PORTAINER_FLAGS=${PORTAINER_FLAGS:-}
|
2023-05-02 03:13:37 +00:00
|
|
|
|
2023-06-07 12:28:40 +00:00
|
|
|
docker rm -f portainer
|
2023-05-02 03:13:37 +00:00
|
|
|
|
|
|
|
docker run -d \
|
2023-06-07 12:28:40 +00:00
|
|
|
-p 8000:8000 \
|
|
|
|
-p 9000:9000 \
|
|
|
|
-p 9443:9443 \
|
|
|
|
-v "$PORTAINER_PROJECT/dist:/app" \
|
|
|
|
-v "$PORTAINER_DATA:/data" \
|
|
|
|
-v /var/run/docker.sock:/var/run/docker.sock:z \
|
|
|
|
-v /var/run/docker.sock:/var/run/alternative.sock:z \
|
|
|
|
-v /tmp:/tmp \
|
|
|
|
--name portainer \
|
|
|
|
portainer/base \
|
|
|
|
/app/portainer $PORTAINER_FLAGS
|