BG5 commited on
Commit
f2051ab
·
verified ·
1 Parent(s): 30ad7ec

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -11
Dockerfile CHANGED
@@ -45,21 +45,15 @@ RUN mkdir -p /var/log/webmin && \
45
  chmod 755 /var/log/webmin
46
 
47
  # 确保配置文件存在且权限正确
48
- RUN touch /etc/webmin/miniserv.conf && \
 
49
  chown root:root /etc/webmin/miniserv.conf && \
50
- chmod 644 /etc/webmin/miniserv.conf
51
-
52
- # 创建一个普通用户
53
- RUN useradd -m webminuser
54
 
55
  # 创建一个启动脚本
56
  RUN echo '#!/bin/bash' > /start-webmin.sh && \
57
- echo 'mkdir -p /var/log/webmin' >> /start-webmin.sh && \
58
- echo 'chown root:root /var/log/webmin' >> /start-webmin.sh && \
59
- echo 'chmod 755 /var/log/webmin' >> /start-webmin.sh && \
60
- echo 'touch /etc/webmin/miniserv.conf' >> /start-webmin.sh && \
61
- echo 'chown root:root /etc/webmin/miniserv.conf' >> /start-webmin.sh && \
62
- echo 'chmod 644 /etc/webmin/miniserv.conf' >> /start-webmin.sh && \
63
  echo 'service webmin start' >> /start-webmin.sh && \
64
  echo 'tail -f /var/log/webmin/miniserv.log' >> /start-webmin.sh && \
65
  chmod +x /start-webmin.sh
 
45
  chmod 755 /var/log/webmin
46
 
47
  # 确保配置文件存在且权限正确
48
+ RUN useradd -m webminuser \
49
+ touch /etc/webmin/miniserv.conf && \
50
  chown root:root /etc/webmin/miniserv.conf && \
51
+ chmod 644 /etc/webmin/miniserv.conf \
52
+ chown -R webminuser:webminuser /etc/webmin && \
53
+ chown -R webminuser:webminuser /var/log/webmin
 
54
 
55
  # 创建一个启动脚本
56
  RUN echo '#!/bin/bash' > /start-webmin.sh && \
 
 
 
 
 
 
57
  echo 'service webmin start' >> /start-webmin.sh && \
58
  echo 'tail -f /var/log/webmin/miniserv.log' >> /start-webmin.sh && \
59
  chmod +x /start-webmin.sh