Skip to content

This image is intentionally very lightweight (`FROM scratch`), making it ideal for use as a backend in load balancing, Kubernetes, and Ingress/Gateway demos.

License

Notifications You must be signed in to change notification settings

batpool/kubernetes-test-image

Repository files navigation

🐹 Go Webserver (Minimal Demo Backend)

Docker Hub

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.


🚀 Quick Start

Run the container:

docker run -P batpool/main:kubernetes-test-image

This maps container port 8080 to a random free port on your host.
Check the mapping:

docker ps

Example 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:

test


⚙️ Details

  • Port: 8080 inside the container
  • User: Runs as a non-root UID/GID
  • Build: Statically compiled Go binary, minimal scratch image
  • Multi-arch Support:
    • linux/386
    • linux/amd64
    • linux/arm/v6
    • linux/arm/v7
    • linux/arm64
    • linux/ppc64le
    • linux/s390x

🧩 Use Cases

  • 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

📦 Building Locally

If you want to build the image yourself:

make build

make amd64-local

📜 License

MIT — free to use for demos, labs, and experiments.

About

This image is intentionally very lightweight (`FROM scratch`), making it ideal for use as a backend in load balancing, Kubernetes, and Ingress/Gateway demos.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published