Files
2026-05-31 14:16:19 +02:00

13 lines
444 B
Bash
Executable File

# Setup the Portainer Agent on a Docker Swarm cluster
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