Files
ecom-dmb/ecom-dmb-backend/deploy/Dockerfile
T
2026-07-08 23:44:05 +08:00

15 lines
451 B
Docker
Raw 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.
# 基础镜像可通过构建参数覆盖(服务器无法访问 Docker Hub 时使用国内镜像)
ARG BASE_IMAGE=docker.m.daocloud.io/library/eclipse-temurin:17-jre-alpine
FROM ${BASE_IMAGE}
WORKDIR /app
RUN addgroup -S app && adduser -S app -G app
COPY app.jar app.jar
RUN chown -R app:app /app
USER app
# 实际端口由 Spring profile 决定(test:8101 / pre:8102 / prod:8103)
EXPOSE 8101 8102 8103
ENTRYPOINT ["java", "-jar", "app.jar"]