mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-06-11 16:07:27 +00:00
appuser 运行时无法在 /app 下创建新子目录,H2 尝试创建 /app/db/nfdData.mv.db 时因目录不存在导致 AccessDeniedException。在 chown 之前预创建目录。
23 lines
547 B
Docker
23 lines
547 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
|
|
|
|
EXPOSE 6400 6401
|
|
|
|
RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser && \
|
|
chown -R appuser:appgroup /app
|
|
USER appuser
|
|
|
|
ENTRYPOINT ["sh", "run.sh"]
|