From ef8503af3bce9e958f38daf7ed3326589e5dbd41 Mon Sep 17 00:00:00 2001 From: xiao Date: Fri, 20 Dec 2024 11:55:45 +0800 Subject: [PATCH] chore: Update Dockerfile and bt.sh for security and dependency management improvements --- Dockerfile | 6 ++++-- bt.sh | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b44b9a..cadd5cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.7.17-alpine +FROM python:3.7.16-alpine # 切换 alpine 镜像源为腾讯云源,更新包列表并安装依赖 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 \ && echo btpaneldocker | bt 5 \ && 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"] diff --git a/bt.sh b/bt.sh index 78f93c3..47eb432 100644 --- a/bt.sh +++ b/bt.sh @@ -33,7 +33,7 @@ soft_start(){ pkill crond /sbin/crond - ssh-keygen -A + ssh-keygen chmod 600 /etc/ssh/ssh_host_* /usr/sbin/sshd -D & }