platforms

This commit is contained in:
Florian Forster
2025-02-24 22:26:01 +01:00
parent 756c147063
commit ebcb639a50
3 changed files with 15 additions and 12 deletions

View File

@@ -20,5 +20,5 @@ RUN yarn lint
FROM nginx AS image
RUN rm -rf /usr/share/nginx/html/*
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /app/dist /usr/share/nginx/html
COPY --from=builder /app/dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -73,22 +73,19 @@ COPY --from=unit-test /app/profile.cov .
FROM debian:latest AS base-image
ENV ZITADEL_ARGS=
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
RUN apt-get update && apt-get install ca-certificates -y
COPY build/entrypoint.sh /app/entrypoint.sh
COPY --from=build /app/zitadel /app/zitadel
COPY --from=build /zitadel-${TARGETOS}-${TARGETARCH} /app/zitadel
RUN echo hodor /zitadel-${TARGETOS}-${TARGETARCH}
RUN useradd -s "" --home / zitadel && \
chown zitadel /app/zitadel && \
chmod +x /app/zitadel && \
chown zitadel /app/entrypoint.sh && \
chmod +x /app/entrypoint.sh
chmod +x /app/zitadel
WORKDIR /app
ENV PATH="/app:${PATH}"
USER zitadel
ENTRYPOINT ["/app/entrypoint.sh"]
FROM scratch AS image
ARG TARGETPLATFORM
COPY --from=base-image /etc/passwd /etc/passwd
COPY --from=base-image /etc/ssl/certs /etc/ssl/certs
COPY --from=base-image /app/zitadel /app/zitadel

View File

@@ -83,7 +83,6 @@ target "_core" {
SASS_VERSION = "1.64.1"
GOLANG_CI_VERSION = "1.64.5"
}
#platforms = ["linux/amd64", "linux/arm64"]
}
target "core" {
@@ -103,7 +102,7 @@ target "core" {
"build" = []
"lint" = []
"unit" = []
"image" = ["${REGISTRY}/zitadel:${GITHUB_SHA}"]
"image" = ["${REGISTRY}/hodor:${GITHUB_SHA}"]
"generate" = []
}[tgt]
cache-to = {
@@ -119,6 +118,13 @@ target "core" {
"unit" = ["type=gha,scope=core-${tgt}"]
"image" = ["type=gha,scope=core-${tgt}"]
"generate" = ["type=gha,scope=core-${tgt}"]
}[tgt]
platforms = {
"build" = []
"lint" = []
"unit" = []
"image" = ["linux/amd64", "linux/arm64"]
"generate" = []
}[tgt]
target = tgt
}