Dockerfile:add dockerfile for go-tetris game
Signed-off-by: CooperLi <a710905118@163.com>
This commit is contained in:
parent
07a3313362
commit
ed7bc35686
|
@ -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"]
|
Loading…
Reference in New Issue