Skip to content

[Feature Request] Add Docker Socket Proxy connection #25

@cerede2000

Description

@cerede2000

Could you please add Socket Proxy connection mode to increase security and allow limiting Docker socket usage to runtime only?

Like this:

services:
  cronmasterProxy:
    image: lscr.io/linuxserver/socket-proxy:latest
    container_name: cronmasterProxy
    healthcheck:
      test: wget --spider http://localhost:2375/version || exit 1
      interval: 5s
      timeout: 2s
      retries: 3
    env_file: ['../.env']
    environment:
      LOG_LEVEL: info # debug,info,notice,warning,err,crit,alert,emerg
      
      # Base
      PING: 1
      VERSION: 1
      INFO: 1
      EVENTS: 1

      POST: 1
      EXEC: 1

      # Disabled
      CONTAINERS: 0
      IMAGES: 0
      NETWORKS: 0
      VOLUMES: 0
      SYSTEM: 0

      ALLOW_START: 0
      ALLOW_STOP: 0
      ALLOW_RESTARTS: 0
      AUTH: 0
      BUILD: 0        
      COMMIT: 0      
      CONFIGS: 0
      DISTRIBUTION: 0
      NODES: 0
      PLUGINS: 0
      SERVICES: 0
      SESSION: 0
      SWARM: 0
      TASKS: 0
      SECRETS: 0
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    tmpfs:
      - /run:rw,uid=${SUID},gid=${GUID},mode=0755
      - /tmp:rw,mode=1777
      - /var/lib/haproxy:rw,uid=${SUID},gid=${GUID},mode=0755
    security_opt:
      - no-new-privileges:true
    read_only: true
    cap_drop:
      - ALL
    user: ${SUID}:${GUID}
    group_add:
      - 990
    expose:
      - 2375
    restart: unless-stopped

And use env var : DOCKER_HOST: tcp://cronmasterProxy:2375 and remove - /var/run/docker.sock:/var/run/docker.sock

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