Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files1234567891011121341415161718192021222324252627288929FROM yimik/kkfileview:latest
# 安装 Xvfb 和其他必要依赖USER rootRUN apt-get update && apt-get install -y \ xvfb \ libxrender1 \ libxext6 \ libxi6 \ libgconf-2-4 \ && rm -rf /var/lib/apt/lists/*
ENV SERVER_PORT=7860ENV KK_SERVER_PORT=7860
RUN echo '#!/bin/bash\n\# 启动虚拟显示\n\Xvfb :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset &\n\export DISPLAY=:99\n\# 等待 Xvfb 启动\n\sleep 2\n\# 启动 kkFileView\n\cd /opt/kkFileView-4.1.0 && bin/startup.sh\n\# 保持容器运行\n\tail -f /opt/kkFileView-4.1.0/log/kkFileView.log\n\' > /start.sh && chmod +x /start.sh
EXPOSE 7860
USER rootRUN chmod -R 777 /opt/kkFileView* || echo "Directory not found, skipping chmod"CMD ["/start.sh"]Dockerfile+23-3