14 lines
279 B
Docker
14 lines
279 B
Docker
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"]
|