Skip to content

Commit

Permalink
build: add docker build from scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
YoRyan committed Jul 15, 2024
1 parent a0c77b3 commit c7faad0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM golang:1-alpine AS build
RUN apk add --no-cache ca-certificates
WORKDIR /src
COPY . .
RUN go mod download
ENV CGO_ENABLED=0 GOOS=linux
RUN go build -a -installsuffix cgo -o ./out/turbogmailify .

FROM scratch
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /src/out/turbogmailify /main
USER 10001
ENTRYPOINT ["/main"]
CMD ["/turbogmailify.conf"]

0 comments on commit c7faad0

Please sign in to comment.