The fastest way to expose your container state with a public API
git clone https://github.com/borgmon/state-proxy
docker-compose -f "./state-proxy/docker-compose.yml" up -d
Then you will have this service on :8090/state/{YOUR_CONTAINER_NAME}
{
"state": "running"
}
You can pass following ENV to config the service
ENV | Default | Note |
---|---|---|
WHITELIST | - | Pass a csv here. If empty: all containers can be reached. Ex: web1,web2 |
PORT | 8090 | Port number |
This service need to access to docker socket. Please mount via
/var/run/docker.sock:/var/run/docker.sock