Dockerfile for running api in container

This commit is contained in:
2022-12-02 18:27:17 +01:00
parent 19cfe37f7b
commit c6157ef5b7

19
Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
# Build the project
FROM golang:1.19 as builder
WORKDIR /go/src/github.com/kevinmidboe/planetposen-mail
ADD . .
RUN make build
# RUN make test
# Create production image for application with needed files
FROM golang:1.19-alpine
EXPOSE 8000
RUN apk add --no-cache ca-certificates
COPY --from=builder /go/src/github.com/kevinmidboe/planetposen-mail .
CMD ["./main"]