Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 766 Bytes

README.md

File metadata and controls

36 lines (29 loc) · 766 Bytes

gohello

This is an example of putting a golang service into docker scratch image

It is almost the smallest possiable docker image

Prepare

$ tar cv --files-from /dev/null | docker import - scratch

Docker Version < 17.05

$ sh build.sh

Docker Version >= 17.05

$ docker build -t fuxu/gohello -f Dockerfile.multi-stage .

Run

$ docker run -it --rm -p 8080:8080 --name hello fuxu/gohello

Reference: