Skip to content

Instantly share code, notes, and snippets.

Created Jul 12, 2020
What would you like to do?
Minimal docker container with a multi-stage build
FROM golang:1.14
WORKDIR /go/src/app
COPY . .
RUN go build hello-world.go
FROM scratch
COPY --from=0 /go/src/app/hello-world .
CMD ["./hello-world"]
package main
import "fmt"
func main() {
fmt.Println("hello world")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment