Skip to content

Adding ENV to use socket proxy #10

Open

Description

@sando38

It would be nice to also configure the agent to use a socket proxy like the main app can:

Swarmpits behavior can be reconfigured via Environment Variables.
SWARMPIT_DOCKER_SOCK

Docker SOCK location used by docker client. In case of socket proxy use following format: http://TCPENDPOINT:2375. Default is /var/run/docker.sock.

Thanks in advance, also for any hints, ideas, considersations in the meantime :)

Activity

  1. kaysond commented on Dec 4, 2021

    @kaysond

    Bump. Can someone on the swarmpit team point us in the right direction for a PR?

  2. kaysond commented on Dec 4, 2021

    @kaysond

    Looks like you might be able to do it just by setting the DOCKER_HOST env var

  3. mrq1911 commented on Aug 21, 2026

    @mrq1911
    Member

    this already works — @kaysond was right. the agent builds its client with client.NewEnvClient(), which reads DOCKER_HOST, DOCKER_API_VERSION, DOCKER_CERT_PATH and DOCKER_TLS_VERIFY from the env.

    so DOCKER_HOST=tcp://proxy:2375 (and drop the socket mount) works today, no code change. the proxy needs to allow containers-list, container-stats, events and logs. it was just never documented — #20 doesn't cover it, so i'll add it to the readme parameters list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions