order-service/Dockerfile.target
Piotr Biernat f03215cfd8
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
continuous-integration/drone/tag Build is passing
Added migrations
2022-12-17 08:26:32 +01:00

31 lines
680 B
Docker

# Builder
ARG BUILDER_IMAGE
FROM ${BUILDER_IMAGE} AS builder
# Destination image - server
# FROM gcr.io/distroless/base-debian10
FROM alpine:3.17
ARG BUILD_TIME
ARG BIN_OUTPUT
ARG SVC_NAME
ARG SVC_VER
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
COPY --from=builder /go/bin/migrate /bin/go_migrate
COPY .env.dist /.env
COPY ./bin /bin
RUN chmod 755 /bin/entrypoint.sh /bin/migrate.sh
EXPOSE 80
CMD ["/app"]
ENTRYPOINT ["entrypoint.sh"]