This is a tiny GO program (and 3MB Docker image) that...
- Waits for a data on port 8080
- Looks for a
\r\n\r\nsequence (indicating end of an HTTP packet) - Spits out the "Hello, World!" (or program's arguments as text) HTTP response...
- ... and immediately close the conneciton.
HTTP/1.1 200 OK Content-Type: text/plain Connection: close Content-Length: 13 Hello, World!
You'd be surprised the amount of time you can save with this when setting disparate parts of your application services!
USAGE
$ docker pull hyperworks/hello $ docker run -p 8080:8080 hyperworks/hello
Or create a named container:
$ docker pull hyperworks/hello $ docker create --name hello -p 8080:8080 hyperworks/hello $ docker start hello
Or, even better, create TEN hello world services!
$ docker pull hyperworks/hello $ for i in {0..9} do docker create --name hello$i -p 808$i:8080 hyperworks/hello Hello from node $i docker start hello$i done
WHAT's THE USE?
- Testing NGINX upstream configuration.
- Testing load balancer configuration.
- Testing API gateways.
- Load-testing a middleware.
- Misc testing uses when setting up microservices.
BUILD
Runs the ./build.sh script to produce a working binary, then run your usual docker build command which
LICENSE
BSD
TODO
- Persistent connection.
- Container w/o any Go stuff.