Sign inSign up

chenchun/hello

By chenchun

•Updated about 4 years ago

A simple static linked web server

Image
0

10K+

chenchun/hello repository overview

⁠Tags

  • latest tag, Dockerfile⁠. Built on top of alpine image with curl installed.
  • simple tag, contains only a single layer of hello binary. build file⁠
  • alpine tag, Dockerfile⁠. Built on top of alpine image without anything else.

⁠Usage

⁠Listen on 80 by default

docker run -d -p 80:80 chenchun/hello /hello "this is hello server"
docker run -d -P --expose 80 chenchun/hello /hello

⁠Listen on a custom port

docker run -d -e PORT=8080 -p 8080:8080 chenchun/hello /hello

⁠Random message

docker run -d -e RANDOM=1 chenchun/hello /hello

# exec into container
curl http://localhost
server 604: Hello World from Go in minimal Docker container
# the number "604" in the curl response is generated randomly on init

⁠Program code

https://github.com/chenchun/dockerfile/blob/master/hello/hello.go⁠

Tag summary

Content type

Image

Digest

sha256:5a2160cc2…

Size

12.1 MB

Last updated

about 4 years ago

docker pull chenchun/hello