This commit is contained in:
Yvan
2026-09-04 14:07:09 +08:00
parent af1e194396
commit 43db5e5450
22 changed files with 416 additions and 134 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ FROM docker.m.daocloud.io/debian:stable-slim
# BIN_NAME 必须与 Makefile build 的 -o 产物名一致(Jenkins 会传 --build-arg)
ARG BIN_NAME=kratos-admin
ENV BIN_NAME=${BIN_NAME}
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
@@ -9,7 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/ \
&& apt-get autoremove -y && apt-get autoclean -y
# Fixed UID/GID so the init container can chown the hostPath config dir.
# Fixed UID/GID so the init container can prepare shared storage.
RUN groupadd --system --gid 1000 kra && useradd --system --uid 1000 --gid kra --home-dir /app kra
COPY --chown=kra:kra bin /app
@@ -24,4 +25,4 @@ EXPOSE 8000
EXPOSE 9000
VOLUME /data/conf
CMD ["./${BIN_NAME}", "-conf", "/data/conf"]
CMD ["sh", "-c", "exec ./$BIN_NAME -conf /data/conf"]