Helloworld service written in golang for test purposes.
245
Run with:
docker container run --rm -ti -p 8080:8080 pablobastidasv/helloworld-go
After run the service, you will see in the containers log next message:
2019/12/12 10:52:57 Service ready to receive requests
curl -i localhost:8080/hello
The response will be:
HTTP/1.1 200 OK
Date: Thu, 12 Dec 2019 10:49:26 GMT
Content-Length: 14
Content-Type: text/plain; charset=utf-8
Hello world!!!
and the container log will show:
2019/12/12 10:53:22 /hello endpoint called.
curl -i localhost:8080/
The response will be:
HTTP/1.1 200 OK
Date: Tue, 17 Dec 2019 09:39:58 GMT
Content-Length: 116
Content-Type: text/plain; charset=utf-8
{"method":"GET","url":"/","protocol":"HTTP/1.1","headers":{"Accept":"[*/*]","User-Agent":"[curl/7.64.1]"},"body":""}
and the container log will show:
2019/12/17 09:39:58 {"method":"GET","url":"/","protocol":"HTTP/1.1","headers":{"Accept":"[*/*]","User-Agent":"[curl/7.64.1]"},"body":""}
2019/12/17 09:39:58 =====
Content type
Image
Digest
Size
6.7 MB
Last updated
almost 7 years ago
docker pull pablobastidasv/helloworld-go