15 lines
279 B
Text
15 lines
279 B
Text
|
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"]
|