Skip to main content

Portainer per Docker Compose bereitstellen

Portainer Agent

services:
  portainer-agent:app:
    container_name: portainer-agent #Name kann beliebig angepasst werden
    image: portainer/agentagent:lts #LTS Version
    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:restart: -always
    portainernetwork_mode: bridge
    deploy:
      resources:
        limits:
          cpus: '0.5'
          memory: 1024M
      restart_policy:
        condition: unless-stopped
        delay: 5s
        window: 120s512M