jenkins
This commit is contained in:
+3
-2
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user