Added dockerfile for go-tetris game (#1)

This commit is contained in:
CooperLi 2021-08-23 17:48:31 +08:00 committed by GitHub
parent 07a3313362
commit 790741ba26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -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"]