Portainer per Docker Compose bereitstellen
Portainer Agent
services:
portainer-agent:
container_name: portainer-agent #Name kann beliebig angepasst werden
image: portainer/agent
ports:
- "9001:9001"
volumes:
# Mount the host's Docker socket into the container
- /var/run/docker.sock:/var/run/docker.sock
# Mount the host's Docker volumes into the container
- /var/lib/docker/volumes:/var/lib/docker/volumes
depends_on:
- portainer
deploy:
resources:
limits:
cpus: '0.5'
memory: 1024M
restart_policy:
condition: unless-stopped
delay: 5s
window: 120s