Skip to content

Instantly share code, notes, and snippets.

View Igneous's full-sized avatar
🎯
working on something v.cool

Bucky Wolfe Igneous

🎯
working on something v.cool
  • Sonant Consulting Group
  • TP Vinh, Nghe An, Vietnam
  • 19:57 (UTC +07:00)
  • LinkedIn in/igneous
View GitHub Profile
@PurpleBooth
PurpleBooth / Dockerfile
Last active March 21, 2024 09:33
Create a static binary in go and put it in a from scratch docker container
FROM golang:1.9
WORKDIR /go/src/github.com/purplebooth/example
COPY . .
RUN go build -ldflags "-linkmode external -extldflags -static" -a main.go
FROM scratch
COPY --from=0 /go/src/github.com/purplebooth/example/main /main
CMD ["/main"]