1

I've just used the example from this documentation(https://media.readthedocs.org/pdf/portainer/1.19.1/portainer.pdf) to configure the portainer's agent but keep receiving the error "Unable to proxy the request via the Docker socket". In this case the stack is displayed as "down".

Portainer works just fine without the agent and mounting docker.sock.

This is the docker-compose fragment

  agent:
    image: portainer/agent
    environment:
      AGENT_CLUSTER_ADDR: tasks.agent
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /var/lib/docker/volumes:/var/lib/docker/volumes
    networks:
      - agent_network
    deploy:
      mode: global
      placement:
        constraints: [node.platform.os == linux]

  portainer:
    image: portainer/portainer
    command: -H tcp://tasks.agent:9001 --tlsskipverify
    ports:
      - target: 9000
        published: 9000
        protocol: tcp
        mode: ingress
    volumes:
      - portainer_data:/data
    networks:
      - agent_network
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints: [node.role == manager]
bruno1cruz
  • 31
  • 2
  • 7
  • How do you deploy this stack? Inside a swarm cluster via docker stack deploy? What's the definition of the agent_network network? – Tony Nov 21 '18 at 04:20

0 Answers0