added docker configuration

This commit is contained in:
fanir 2022-01-26 00:44:39 +01:00
parent 3cc7282183
commit feee1184d6
4 changed files with 79 additions and 0 deletions

16
Dockerfile Normal file
View file

@ -0,0 +1,16 @@
#build stage
FROM golang:1.17-alpine AS builder
RUN apk add --no-cache git
WORKDIR /go/src/app
COPY . .
WORKDIR /go/src/app/cmd/feedizer
RUN go build -o /go/bin/app -v .
#final stage
FROM alpine:latest
RUN apk --no-cache add ca-certificates
COPY --from=builder /go/bin/app /app
ENV FEEDIZER_ALLOWROOT=1
ENTRYPOINT /app
LABEL Name=feedizer Version=0.0.1
EXPOSE 3000