This repo creates a simple Golang server that responds to requests on localhost:8000/env with the messageHello, ${WORLD}!
, where ${WORLD}
is the WORLD environment variable.
$ docker build -t hello-go .
$ docker run -d -p 8000:8000 -e "WORLD=Go Programmer" --rm --name hello-go hello-go
$ docker exec hello-go curl -s localhost:8000/env
Hello, Go Programmer! // Expected output
$ docker kill hello-go