Sign inSign up

iwdmb/get-container-id

By iwdmb

•Updated over 6 years ago

get-container-id: Get the container/pod ID from inside the container/pod. Supports Docker and K8s.

Image
Networking
Developer tools
0

2.6K

iwdmb/get-container-id repository overview

⁠get-container-id

Get a Container ID from inside of itself :)

GitHub repository: https://github.com/ming-go/lab/tree/master/get-container-id⁠

⁠Using

~$ docker pull iwdmb/get-container-id:1.0.7-root

⁠Support

  • Docker (Compose, Swarm)
  • Kubernetes (K8s)

⁠API Endpoint

  • GET /containerID # Response container's ID
HTTP/1.1 200 OK
Content-Type: application/json
{
    "data":"629ebc1d8c4a1e95bc32737e6270f08905b441ad6a08c76f4cff4897bb8c6d98"
}
  • GET /hello # Response Hello, world!
HTTP/1.1 200 OK
Content-Type: application/json
{
    "data":"Hello, ming-go!"
}
  • GET /counter # A counter, Requests per second
HTTP/1.1 200 OK
Content-Type: application/json
{
    "data":"1"
}
  • Any /* # Output Request Info

Tag summary

Content type

Image

Digest

Size

6.1 MB

Last updated

over 6 years ago

docker pull iwdmb/get-container-id:1.0.7-root