Skip to content

Tiny HTTP server showing the environment variables

Notifications You must be signed in to change notification settings

vikaskumar925/httpenv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Tiny HTTP server showing the environment variables

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages

  • Go 65.4%
  • Dockerfile 34.6%