Sign inSign up

dasfrugen/tiny-go-server

By dasfrugen

•Updated over 5 years ago

A tiny docker image that responds to http requests on a given port.

Image
0

100K+

dasfrugen/tiny-go-server repository overview

⁠Tiny Go Server

This is a tiny (<5mb) docker image that responds to http requests on a given port (default 8080). It does nothing else.

⁠Usage

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⁠.

⁠But Why

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/⁠

⁠Source

https://github.com/Frug/tiny-go-server⁠

Tag summary

Content type

Image

Digest

Size

1.7 MB

Last updated

over 5 years ago

docker pull dasfrugen/tiny-go-server:1.0