mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 05:52:51 +00:00
# Which Problems Are Solved - Solves a problem of healthcheck/use of zitadel in gitlab CI pipeline # How the Problems Are Solved - Adds an EXPOSE command to the Dockerfile # Additional Changes # Additional Context - https://docs.docker.com/reference/dockerfile/#expose - https://github.com/docker-library/postgres/blob/cc254e85ed86e1f8c9052f9cbf0e3320324f0421/16/bookworm/Dockerfile#L218 Co-authored-by: Maksim Khardin <[email protected]> Co-authored-by: Ramon <[email protected]> Co-authored-by: Livio Spring <[email protected]>
34 lines
777 B
Docker
34 lines
777 B
Docker
FROM --platform=$TARGETPLATFORM debian:latest as artifact
|
|
ENV ZITADEL_ARGS=
|
|
ARG TARGETPLATFORM
|
|
|
|
RUN apt-get update && apt-get install ca-certificates -y
|
|
|
|
COPY build/entrypoint.sh /app/entrypoint.sh
|
|
COPY zitadel /app/zitadel
|
|
|
|
RUN useradd -s "" --home / zitadel && \
|
|
chown zitadel /app/zitadel && \
|
|
chmod +x /app/zitadel && \
|
|
chown zitadel /app/entrypoint.sh && \
|
|
chmod +x /app/entrypoint.sh
|
|
|
|
WORKDIR /app
|
|
ENV PATH="/app:${PATH}"
|
|
|
|
USER zitadel
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
|
|
FROM --platform=$TARGETPLATFORM scratch as final
|
|
ARG TARGETPLATFORM
|
|
|
|
COPY --from=artifact /etc/passwd /etc/passwd
|
|
COPY --from=artifact /etc/ssl/certs /etc/ssl/certs
|
|
COPY --from=artifact /app/zitadel /app/zitadel
|
|
|
|
HEALTHCHECK NONE
|
|
EXPOSE 8080
|
|
|
|
USER zitadel
|
|
ENTRYPOINT ["/app/zitadel"]
|