2022-12-02 21:03:08 +01:00
|
|
|
# Builder
|
2022-12-03 23:36:59 +01:00
|
|
|
ARG BUILDER_IMAGE
|
2022-12-02 21:03:08 +01:00
|
|
|
FROM ${BUILDER_IMAGE} AS builder
|
|
|
|
|
|
|
|
# Destination image - server
|
|
|
|
# FROM gcr.io/distroless/base-debian10
|
|
|
|
FROM alpine:3.17
|
|
|
|
|
|
|
|
ARG SVC_NAME
|
|
|
|
ARG SVC_VER
|
2022-12-03 23:36:59 +01:00
|
|
|
ARG BIN_OUTPUT
|
|
|
|
ARG BUILD_TIME
|
2022-12-02 21:03:08 +01:00
|
|
|
|
|
|
|
LABEL dev.egommerce.image.author="Piotr Biernat"
|
2022-12-02 21:51:51 +01:00
|
|
|
LABEL dev.egommerce.image.vendor="Egommerce"
|
2022-12-02 21:03:08 +01:00
|
|
|
LABEL dev.egommerce.image.service=${SVC_NAME}
|
|
|
|
LABEL dev.egommerce.image.version=${SVC_VER}
|
2022-12-03 23:36:59 +01:00
|
|
|
LABEL dev.egommerce.image.build_time=${BUILD_TIME}
|
2022-12-02 21:03:08 +01:00
|
|
|
|
|
|
|
WORKDIR /
|
|
|
|
COPY --from=builder $BIN_OUTPUT /app
|
|
|
|
COPY .env.dist /.env
|
2022-12-07 02:42:58 +01:00
|
|
|
COPY ./bin/entrypoint.sh ./bin/wait-for-it.sh /
|
|
|
|
RUN chmod 755 /entrypoint.sh
|
2022-12-02 21:03:08 +01:00
|
|
|
|
|
|
|
EXPOSE 80
|
2022-12-07 02:42:58 +01:00
|
|
|
|
2022-12-16 01:01:54 +01:00
|
|
|
CMD ["sh", "-c", "/app"]
|
2022-12-07 02:42:58 +01:00
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|