Add Dockerfile
This commit is contained in:
parent
1c554cedf0
commit
1f5cbcb12c
1 changed files with 14 additions and 0 deletions
14
Dockerfile
Normal file
14
Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
FROM golang:1.14 AS builder
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . /app
|
||||||
|
RUN \
|
||||||
|
CGO_ENABLED=0 \
|
||||||
|
GOOS=linux \
|
||||||
|
GOPROXY=https://proxy.golang.org,direct \
|
||||||
|
go build -ldflags "-s -w" -o main .
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
|
COPY --from=builder /app/main .
|
||||||
|
COPY phrases.json .
|
||||||
|
USER 1000
|
||||||
|
ENTRYPOINT ["/main"]
|
Loading…
Reference in a new issue