chore: Update Dockerfile and bt.sh for security and dependency management improvements

This commit is contained in:
xiao 2024-12-20 11:55:45 +08:00
parent 355c6796b7
commit ef8503af3b
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
FROM python:3.7.17-alpine FROM python:3.7.16-alpine
# 切换 alpine 镜像源为腾讯云源,更新包列表并安装依赖 # 切换 alpine 镜像源为腾讯云源,更新包列表并安装依赖
RUN apk update && apk upgrade \ RUN apk update && apk upgrade \
@ -26,7 +26,9 @@ RUN echo y | bash /install_panel.sh -P 8888 --ssl-disable \
RUN echo btpanel | bt 6 \ RUN echo btpanel | bt 6 \
&& echo btpaneldocker | bt 5 \ && echo btpaneldocker | bt 5 \
&& echo "/btpanel" > /www/server/panel/data/admin_path.pl \ && echo "/btpanel" > /www/server/panel/data/admin_path.pl \
&& echo "root:btpaneldocker" | chpasswd && echo "root:btpaneldocker" | chpasswd \
&& echo "PermitRootLogin yes" | tee -a /etc/ssh/sshd_config
ENTRYPOINT ["/bin/sh","-c","/bt.sh"] ENTRYPOINT ["/bin/sh","-c","/bt.sh"]

2
bt.sh
View File

@ -33,7 +33,7 @@ soft_start(){
pkill crond pkill crond
/sbin/crond /sbin/crond
ssh-keygen -A ssh-keygen
chmod 600 /etc/ssh/ssh_host_* chmod 600 /etc/ssh/ssh_host_*
/usr/sbin/sshd -D & /usr/sbin/sshd -D &
} }