identity-service/Dockerfile

26 lines
467 B
Docker
Raw Permalink Normal View History

2022-10-06 20:10:05 +02:00
# 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"
2022-10-06 22:36:17 +02:00
LABEL service="identity"
2022-10-06 20:10:05 +02:00
LABEL vendor="Egommerce"
LABEL version="1.0"
COPY --from=builder /go/bin/app /app
COPY .env.dist /.env
EXPOSE 8080
ENTRYPOINT ["/app"]