Files

15 lines
469 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.
# 运行时镜像:业务代码与依赖通过 volume 挂载 /app,更新部署无需重建镜像
ARG BASE_IMAGE=docker.m.daocloud.io/library/python:3.12-slim
FROM ${BASE_IMAGE}
WORKDIR /app
RUN groupadd --system app && useradd --system --gid app --home-dir /app app
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
USER app
# 实际端口由环境 PORT 决定(test:8201 / pre:8202 / prod:8203)
EXPOSE 8201 8202 8203
ENTRYPOINT ["/entrypoint.sh"]