FROM openlistteam/openlist:beta-aio WORKDIR /opt/openlist USER root # 创建数据目录并赋权 RUN mkdir -p /opt/openlist/data RUN chmod -R 777 /opt/openlist/data # 安装 Nginx(Alpine 用 apk) RUN apk update && apk add --no-cache nginx # 复制 Nginx 配置 COPY nginx.conf /etc/nginx/nginx.conf # 暴露端口 EXPOSE 7860 # 启动命令:先启动 OpenList,再启动 Nginx CMD ["sh", "-c", "./openlist server & nginx -g 'daemon off;'"]