README ¶ go-container-status A REST API designed in go to check for a container status Getting Started go-container-status is packaged as docker container. Docker image is available on Docker Hub. Docker run docker run -p 5000:5000 -v /var/run/docker.sock:/var/run/docker.sock -e LISTEN_ADDR='0.0.0.0' go-container-status Docker Compose version: "3" services: go-container-status: image: hibare/go-container-status container_name: go-container-status hostname: go-container-status environment: - LISTEN_ADDR=0.0.0.0 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro ports: - "5000:5000" logging: driver: "json-file" options: max-size: "500k" max-file: "5" Endpoints Check health /ping/ Check a container status /container/{container_name}/status/ Example: > curl -H "Authorization: test" http://127.0.0.1:5000/container/postgres/status/ [{"Name":["/postgres"],"State":"exited","Status":"Exited (0) 2 hours ago","Image":"postgres:latest"}] > curl -H "Authorization: test" http://127.0.0.1:5000/container/postgrsaes/status/ Not found Supported Environment Variables Variable Description Default Value LISTEN_ADDR IP address to bind to 127.0.0.1 LISTEN_PORT Port to bind to 5000 API_KEYS API Keys used for auth Autogenerated Expand ▾ Collapse ▴ Directories ¶ Show internal Expand all Path Synopsis cmd go-container-status internal api api/handlers api/middlewares config containers env utils Click to show internal directories. Click to hide internal directories.