BG5 commited on
Commit
b549e0f
·
verified ·
1 Parent(s): e375a4a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -5
Dockerfile CHANGED
@@ -41,22 +41,22 @@ RUN apt-get update && apt-get install -y \
41
  # bash quick_start.sh
42
  # 创建一个启动脚本
43
  RUN echo '#!/bin/bash' > /start-webmin.sh && \
 
 
 
44
  echo 'service webmin start' >> /start-webmin.sh && \
45
  echo 'tail -f /var/log/webmin/miniserv.log' >> /start-webmin.sh && \
46
  chmod +x /start-webmin.sh
47
 
48
 
49
- # 创建非特权用户
50
- RUN useradd -m -s /bin/bash appuser
51
  # 设置工作目录为/app
52
  WORKDIR /app
53
  COPY . .
54
- # 更改目录和文件的所有者
55
- RUN chown -R appuser:appuser /app
56
  # 安装任何需要的包,使用 --ignore-installed 选项
57
  RUN pip install --no-cache-dir --ignore-installed --break-system-packages -r requirements.txt
58
  EXPOSE 7860
59
 
60
  # 使用 ENTRYPOINT 和 CMD 组合来启动 Webmin
61
  ENTRYPOINT ["/start-webmin.sh"]
62
- CMD ["sh", "-c", "python main.py"]
 
41
  # bash quick_start.sh
42
  # 创建一个启动脚本
43
  RUN echo '#!/bin/bash' > /start-webmin.sh && \
44
+ echo 'mkdir -p /var/log/webmin' >> /start-webmin.sh && \
45
+ echo 'chown root:root /var/log/webmin' >> /start-webmin.sh && \
46
+ echo 'chmod 755 /var/log/webmin' >> /start-webmin.sh && \
47
  echo 'service webmin start' >> /start-webmin.sh && \
48
  echo 'tail -f /var/log/webmin/miniserv.log' >> /start-webmin.sh && \
49
  chmod +x /start-webmin.sh
50
 
51
 
52
+
 
53
  # 设置工作目录为/app
54
  WORKDIR /app
55
  COPY . .
 
 
56
  # 安装任何需要的包,使用 --ignore-installed 选项
57
  RUN pip install --no-cache-dir --ignore-installed --break-system-packages -r requirements.txt
58
  EXPOSE 7860
59
 
60
  # 使用 ENTRYPOINT 和 CMD 组合来启动 Webmin
61
  ENTRYPOINT ["/start-webmin.sh"]
62
+ # CMD ["sh", "-c", "python main.py"]