Kindred-Genius / sample-gitflow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

httpenv

Tiny HTTP server showing the environment variables on TCP 8888.

Lint Code Base Docker Build

Images for linux/x86_64 (amd64), linux/arm64 (v8), and linux/arm/v7

This can be used for various container learnings like how DNS round-robin works, rolling updates, etc. It can be easier to use than something large and resource hungary like elasticsearch, while still providing a way to check which container you're seeing in browser (or curl) by viewing the env vars it returns in HTTP.

Run it from Docker Hub on host port 8888:

docker run -d -p 8888:8888 bretfisher/httpenv

or from GitHub Container Registry (GHCR) with:

docker run -d -p 8888:8888 ghcr.io/bretfisher/httpenv

If you curl it, you should get back its environment variables, including the container name:

curl http://localhost:8888

{"HOME":"/root","HOSTNAME":"c9d8d26bda3a","PATH":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}```

About


Languages

Language:Go 64.0%Language:Dockerfile 36.0%