Sign inSign up

stefanprodan/caddy-dockerd

By stefanprodan

•Updated about 9 years ago

Caddy reverse proxy for Docker Remote API with IP filter

Image
0

1.8K

stefanprodan/caddy-dockerd repository overview

⁠caddy-dockerd

Docker Image

Caddy reverse proxy for Docker Remote API with IP filtering.

⁠Run Caddy

Filter Docker API access by IPv4 or IPv6 or range of IPs

docker run -d -e IP=86.124.244.168 \
    --net=host \
    --name=caddy-dockerd \
    --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    stefanprodan/caddy-dockerd:sock

Docker Swarm service:

docker service create -d -e IP=188.27.83.136/30 \
    --network=host \
    --name=caddy-dockerd \
    --mode global \
    --constraint 'node.role == manager' \
    --mount type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock \
    stefanprodan/caddy-dockerd:sock

Test access on port 7575 with curl:

curl <DOCKER-IP>:7575/version
⁠Docker remote access
$ export DOCKER_HOST=tcp://<DOCKER-IP>:7575

$ docker info

Tag summary

Content type

Image

Digest

Size

8.5 MB

Last updated

about 9 years ago

docker pull stefanprodan/caddy-dockerd