Files
docker/portainer_agent/run.sh
T
2026-05-28 02:56:22 +02:00

17 lines
514 B
Bash
Executable File

# Setup the Portainer Agent on a Docker Swarm cluster
docker network create \
--driver overlay \
portainer_agent_network
docker service create \
--name portainer_agent \
--network portainer_agent_network \
-p 9001:9001/tcp \
--mode global \
--constraint 'node.platform.os == linux' \
--mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock \
--mount type=bind,src=//var/lib/docker/volumes,dst=/var/lib/docker/volumes \
--mount type=bind,src=//,dst=/host \
portainer/agent:2.39.2