mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-06-10 23:47:29 +00:00
去掉 USER appuser,entrypoint 以 root 身份运行,先 chown 修复 volume 挂载目录的权限,再通过 su 降权到 appuser 执行应用。
23 lines
588 B
Docker
23 lines
588 B
Docker
FROM eclipse-temurin:17-jre
|
|
|
|
WORKDIR /app
|
|
|
|
# 安装 unzip
|
|
RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY ./web-service/target/netdisk-fast-download-bin.zip .
|
|
|
|
RUN unzip netdisk-fast-download-bin.zip && \
|
|
mv netdisk-fast-download/* ./ && \
|
|
rm netdisk-fast-download-bin.zip && \
|
|
chmod +x run.sh && \
|
|
mkdir -p db logs
|
|
|
|
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
|
|
RUN chmod +x /docker-entrypoint.sh
|
|
|
|
EXPOSE 6400 6401
|
|
|
|
RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|