filebox / Dockerfile
HelloTestUser's picture
Create Dockerfile
aa18583 verified
raw
history blame contribute delete
446 Bytes
# 使用最流行的 FileCodeBox 镜像
FROM lanol/filecodebox:latest
# 🔧 关键修正:Hugging Face 运行在非 Root 用户下,我们需要把数据目录权限放开
# 否则程序会因为没权限写入数据库和上传文件而报错
USER root
RUN mkdir -p /app/data && chmod -R 777 /app/data
# 🌍 设置端口
# FileCodeBox 默认跑在 12345,我们通过环境变量把它改到 7860
ENV PORT=7860
# 暴露端口
EXPOSE 7860