Files
orion-visor/docker/service/Dockerfile

25 lines
638 B
Docker
Raw Normal View History

2024-02-25 00:18:08 +08:00
FROM nginx:alpine
USER root
2024-05-28 13:13:17 +08:00
WORKDIR /app
# 系统时区
2024-05-27 11:45:58 +08:00
ARG TZ=Asia/Shanghai
2024-05-28 17:07:41 +08:00
# 添加包
2024-02-25 17:44:21 +08:00
RUN \
2024-05-29 11:57:14 +08:00
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
2024-05-28 17:07:41 +08:00
apk update && \
apk add tzdata && \
2024-06-19 11:53:06 +08:00
apk add dmidecode && \
2024-05-28 17:07:41 +08:00
apk add openjdk8
2024-05-27 11:45:58 +08:00
# 设置时区
2024-05-28 17:07:41 +08:00
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
2024-05-27 11:45:58 +08:00
echo '${TZ}' > /etc/timezone
2024-05-28 13:13:17 +08:00
# 删除原 nginx 配置
2024-02-25 00:18:08 +08:00
RUN rm -rf /etc/nginx/conf.d/*
2024-05-28 13:13:17 +08:00
# 复制包
2024-05-16 00:03:30 +08:00
COPY ./orion-visor-launch.jar /app/app.jar
2024-02-27 18:49:55 +08:00
COPY ./dist /usr/share/nginx/html
COPY ./entrypoint.sh /app/entrypoint.sh
COPY ./nginx.conf /etc/nginx/conf.d
2024-05-28 13:13:17 +08:00
# 启动
2024-02-25 00:18:08 +08:00
ENTRYPOINT [ "sh", "/app/entrypoint.sh" ]