From 790741ba2602664a4cb218de98828595361d7bb2 Mon Sep 17 00:00:00 2001 From: CooperLi Date: Mon, 23 Aug 2021 17:48:31 +0800 Subject: [PATCH] Added dockerfile for go-tetris game (#1) --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..75f4907 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM golang:alpine as builder + +WORKDIR /go/src/github.com/MichaelS11/go-tetris +COPY . . + +RUN apk add --no-cache git +RUN go get ./ +RUN go build -ldflags="-extldflags=-static" -o /go/bin/go-tetris + +FROM scratch +WORKDIR / +COPY --from=builder /go/bin/go-tetris . + +ENTRYPOINT ["./go-tetris"]