Skip to content

Add example with remote docker host #131

@SheepReaper

Description

@SheepReaper

In this instance, it's not really all that helpful since some of the APIs that Shepherd uses are privileged. Shepherd doesn't require being exposed to the internet, so feel free to discard it if this isn't helpful. But here's a working example with a Docker API proxy.

services:
  shepherd:
    image: containrrr/shepherd
    environment:
      DOCKER_HOST: tcp://tasks.socket-proxy:2375
    networks:
      - socket_proxy
    deploy:
      replicas: 1
      
  socket-proxy:
    image: tecnativa/docker-socket-proxy
    networks:
      - socket_proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    deploy:
      replicas: 1
      placement:
        constraints:
          - node.role==manager
    environment:
      LOG_LEVEL: info # debug,info,warning,notice,err,crit,alert,emerg
      ## Variables match the URL prefix (i.e. AUTH blocks access to /auth/* parts of the API, etc.).
      POST: 1
      SERVICES: 1
      DISTRIBUTION: 1
      TASKS: 1
      NODES: 1

networks:
  socket_proxy:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions