diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3bd1af6 --- /dev/null +++ b/Dockerfile @@ -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"]