A tiny Go webserver that runs as a non-root user and serves a simple HTML page showing:
- 🖥️ Hostname of the container
- 🌐 Container IP address
- 🔌 Listening port
- 📑 Request URI
- ⏰ Local time of the webserver
This image is intentionally very lightweight (FROM scratch), making it ideal for use as a backend in load balancing, Kubernetes, and Ingress/Gateway demos.
Run the container:
docker run -P batpool/main:kubernetes-test-imageThis maps container port 8080 to a random free port on your host.
Check the mapping:
docker psExample output:
CONTAINER ID IMAGE PORTS
abc123... batpool/main:kubernetes-test-image 0.0.0.0:49154->8080/tcp
Open your browser at:
http://localhost:49154
You’ll see a page like this:
- Port:
8080inside the container - User: Runs as a non-root UID/GID
- Build: Statically compiled Go binary, minimal
scratchimage - Multi-arch Support:
linux/386linux/amd64linux/arm/v6linux/arm/v7linux/arm64linux/ppc64lelinux/s390x
- Demo backend for Kubernetes Ingress / Gateway API / Service Mesh
- Testing with reverse proxies (NGINX, Envoy, HAProxy, Traefik)
- Load balancer sticky-session demos
- General networking experiments
If you want to build the image yourself:
make build
make amd64-localMIT — free to use for demos, labs, and experiments.
