HTTP server printing the hostname for load balancer testing, about ~1.67 MB in size!
245
HTTP server printing the hostname for the load balancer testing, about ~1.67 MB in size!
Program written in Go which spins up a web server and prints its current hostname (i.e. the docker container ID), its IP address and port as well as the request URI and the local time of the web server.
Build via a multi-stage build and compress with UPX to make the image as small as possible ~1.67MB
docker run --rm -it -p 8080:80 hugobin/go-hello
$ curl http://localhost:8080/somepath?foo=bar
Hello from b2a20cada094
Server address: 172.17.0.2:80
Server name: b2a20cada094
Date: 2020-02-23T23:30:33Z
URI: /somepath?foo=bar
This image was created to be used as a simple backends for various load balancing testing.
Content type
Image
Digest
Size
1.6 MB
Last updated
over 6 years ago
docker pull hugobin/go-hello