identity-service/Dockerfile.target

37 lines
863 B
Docker
Raw Permalink Normal View History

# Builder
2022-12-03 23:36:59 +01:00
ARG BUILDER_IMAGE
FROM ${BUILDER_IMAGE} AS builder
# Destination image - server
# FROM gcr.io/distroless/base-debian10
2024-07-20 19:18:49 +02:00
FROM alpine:3.17
ARG SVC_NAME
ARG SVC_VER
2022-12-03 23:36:59 +01:00
ARG BIN_OUTPUT
ARG BUILD_TIME
LABEL dev.egommerce.image.author="Piotr Biernat"
LABEL dev.egommerce.image.vendor="Egommerce"
LABEL dev.egommerce.image.service=${SVC_NAME}
LABEL dev.egommerce.image.version=${SVC_VER}
LABEL dev.egommerce.image.build_time=${BUILD_TIME}
WORKDIR /
COPY --from=builder $BIN_OUTPUT /app
2023-10-01 21:35:21 +02:00
COPY --from=builder /go/bin/migrate /bin/migrate
COPY --from=builder /go/bin/health /bin/health
2024-07-20 19:18:49 +02:00
COPY .env.docker /.env
COPY ./.app.config /
2022-12-17 06:31:35 +01:00
COPY ./bin /bin
RUN chmod 755 /bin/entrypoint.sh /bin/migrate.sh
2024-07-20 19:18:49 +02:00
RUN apk add curl
EXPOSE 443
2022-12-07 02:42:58 +01:00
2022-12-17 06:31:35 +01:00
ENTRYPOINT ["entrypoint.sh"]
2023-10-01 21:35:21 +02:00
CMD ["sh", "-c", "/app"]
HEALTHCHECK --interval=5s --timeout=1s --retries=20 CMD health >/dev/null || exit 1