🐳 分离 docker 镜像.

This commit is contained in:
lijiahangmax
2025-03-17 21:27:48 +08:00
parent bc776e4186
commit 9752dfa680
12 changed files with 110 additions and 55 deletions

View File

@@ -1,4 +1,4 @@
FROM nginx:alpine
FROM openjdk:8-jdk-alpine
USER root
WORKDIR /app
# 系统时区
@@ -8,17 +8,11 @@ RUN \
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
apk update && \
apk add tzdata && \
apk add dmidecode && \
apk add openjdk8
apk add dmidecode
# 设置时区
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo '${TZ}' > /etc/timezone
# 删除原 nginx 配置
RUN rm -rf /etc/nginx/conf.d/*
# 复制包
COPY ./orion-visor-launch.jar /app/app.jar
COPY ./dist /usr/share/nginx/html
COPY ./entrypoint.sh /app/entrypoint.sh
COPY ./nginx.conf /etc/nginx/conf.d
# 启动
ENTRYPOINT [ "sh", "/app/entrypoint.sh" ]
CMD ["java", "-jar", "/app/app.jar"]