Files
2026-09-23 17:42:55 +08:00

31 lines
909 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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 \
netbase \
&& rm -rf /var/lib/apt/lists/ \
&& apt-get autoremove -y && apt-get autoclean -y
# 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
RUN mkdir -p /data/conf /app/uploads/file && chown -R kra:kra /data/conf /app/uploads
WORKDIR /app
USER kra
EXPOSE 8000
EXPOSE 9000
# WebRTC 媒体 UDP 端口(KRA_LIVE_UDP_PORT,deploy.sh 默认 9504 并通过 -p 发布)
EXPOSE 9504/udp
VOLUME /data/conf
CMD ["sh", "-c", "exec ./$BIN_NAME -conf /data/conf"]