identity-service/Dockerfile
Piotr Biernat 5adafdd8fb
All checks were successful
continuous-integration/drone/push Build is passing
code quality fixes
2022-10-06 22:37:58 +02:00

26 lines
467 B
Docker

# Builder
FROM golang:alpine AS builder
WORKDIR /go/src/app
ARG MAIN_GO=cmd/main.go
COPY src ./
RUN go mod download && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /go/bin/app $MAIN_GO
# Destination image
FROM gcr.io/distroless/base-debian10
LABEL author="Piotr Biernat"
LABEL service="identity"
LABEL vendor="Egommerce"
LABEL version="1.0"
COPY --from=builder /go/bin/app /app
COPY .env.dist /.env
EXPOSE 8080
ENTRYPOINT ["/app"]