A tiny docker image that responds to http requests on a given port.
100K+
This is a tiny (<5mb) docker image that responds to http requests on a given port (default 8080). It does nothing else.
Run this image (on port 8080):
docker pull dasfrugen/tiny-go-server:1.0
docker run -p 8080:8080 --rm dasfrugen/tiny-go-server:1.0
Check its output
curl localhost:8080
> Pong
You can change the listening port of the container by setting a PORT environment variable.
This image is built with ideas from Nick Gauthier and Adriaan de Jonge.
I needed a tiny image that would run and pass an http health check as a placeholder for some weird AWS stuff, and couldn't find one prebuilt on docker hub.
There's an even smaller possibility using Rust: https://blog.semicolonsoftware.de/building-minimal-docker-containers-for-rust-applications/
Content type
Image
Digest
Size
1.7 MB
Last updated
over 5 years ago
docker pull dasfrugen/tiny-go-server:1.0