Skip to content

revl-ca/docker-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-proxy

This server proxy all GET routes to the docker.sock and deny all other HTTP method.

How to build

docker build -t docker-proxy .

Build args

Arg Default
SERVER_PORT 8080

docker build --build-arg SERVER_PORT=8888 -t docker-proxy .

How to run

docker run -d --rm -v /var/run/docker.sock:/var/run/docker.sock:ro -p 8080:8080 docker-proxy

Examples

URL Description Result
curl -g -X GET http://localhost:8080/v1.33/containers/json?filters={} Returns a list of containers 👍
curl -g -X POST http://localhost:8080/v1.33/containers/{id}/stop Stop a container 💥

Ref: https://docs.docker.com/engine/api/v1.33/