Sign inSign up

fuyufjh/go-scratch

By fuyufjh

•Updated almost 10 years ago

Minimal Container Image for Go Binaries

Image
0

1.2K

fuyufjh/go-scratch repository overview

⁠go-scratch

Minimal container image for Go binaries.

⁠How to use

Step 1. Build with static link

CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o build/release/my-program main.go

Step 2. Use following Dockerfile to build image

FROM fuyufjh/go-scratch
ADD ./build/release/my-program /
ENTRYPOINT ["/my-program"]

Enjoy it!

Tag summary

Content type

Image

Digest

Size

151.7 kB

Last updated

almost 10 years ago

docker pull fuyufjh/go-scratch