diff --git a/Dockerfile b/Dockerfile index 787a80e..9fd7c28 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bookworm +FROM debian:bookworm-slim # 切换 Debian 镜像源为腾讯云源,更新包列表并安装依赖 RUN sed -i 's/deb.debian.org/mirrors.tencent.com/g' /etc/apt/sources.list.d/debian.sources \ @@ -16,7 +16,7 @@ COPY ["bt.sh", "init_mysql.sh", "/"] # 转换启动脚本 RUN dos2unix /bt.sh && dos2unix /init_mysql.sh -# 下载并安装宝塔面板及 lnmp 环境 +# 下载并安装宝塔面板及 nginx RUN curl -sSO https://download.bt.cn/install/install_panel.sh \ && echo y | bash install_panel.sh -P 8888 --ssl-disable \ && mkdir /lnmp \ @@ -40,8 +40,8 @@ RUN echo btpanel | bt 6 \ ENTRYPOINT ["/bin/sh","-c","/bt.sh"] -# 暴漏所有端口 -EXPOSE 0-65535 +# 暴漏特定端口 +EXPOSE 22 80 443 888 3306 8888 # 健康检查 HEALTHCHECK --interval=5s --timeout=3s CMD prot="http"; if [ -f "/www/server/panel/data/ssl.pl" ]; then prot="https"; fi; curl -k -i $prot://127.0.0.1:$(cat /www/server/panel/data/port.pl)$(cat /www/server/panel/data/admin_path.pl) | grep -E '(200|404)' || exit 1 \ No newline at end of file