v / Dockerfile
ckst's picture
Update Dockerfile
0e1d734 verified
raw
history blame
642 Bytes
FROM justsong/VoAPI:latest as VoAPI
FROM nginx:alpine
EXPOSE 7860
# 创建所有必要的目录并设置权限
RUN mkdir -p /data/logs && \
mkdir -p /logs && \
chmod -R 777 /data && \
chmod -R 777 /logs
# Nginx相关目录设置
RUN chmod 777 /var/cache/nginx && \
mkdir -p /var/log/nginx && \
chmod 777 /var/log/nginx && \
touch /var/run/nginx.pid && \
chmod 777 /var/run/nginx.pid
# 从oneapi镜像复制必要的文件
COPY --from=VoAPI /VoAPI /VoAPI
COPY --from=VoAPI /data /data
# 复制配置文件
COPY nginx.conf /etc/nginx/nginx.conf
COPY start.sh /start.sh
RUN chmod +x /start.sh
CMD ["/start.sh"]