https://github.com/hgtgh/docker-go-hello
HTTP server printing the hostname for the load balancer testing, about ~1.67 MB in size!
https://github.com/hgtgh/docker-go-hello
balancing-testing container docker go golang hostname load-balancer
Last synced: 5 months ago
JSON representation
HTTP server printing the hostname for the load balancer testing, about ~1.67 MB in size!
- Host: GitHub
- URL: https://github.com/hgtgh/docker-go-hello
- Owner: hgtgh
- License: mit
- Created: 2020-02-24T02:10:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-01T18:24:22.000Z (over 6 years ago)
- Last Synced: 2024-06-20T03:03:19.990Z (almost 2 years ago)
- Topics: balancing-testing, container, docker, go, golang, hostname, load-balancer
- Language: Go
- Homepage: https://hub.docker.com/r/hugobin/go-hello
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HTTP server in Go, printing the current hostname for load balancer testing
[](https://hub.docker.com/r/hugobin/go-hello)
[](https://goreportcard.com/report/github.com/T-Hugo/docker-go-hello)


>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](https://github.com/upx/upx) to make the image as small as possible **~1.67MB**
## How to use this image
``` shell script
docker run --rm -it -p 8080:80 hugobin/go-hello
```
``` shell script
$ 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.