debug: 拆分便于调试
This commit is contained in:
		
							parent
							
								
									0f302ed567
								
							
						
					
					
						commit
						d96aea69c9
					
				
							
								
								
									
										51
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										51
									
								
								Dockerfile
									
									
									
									
									
								
							| @ -2,30 +2,45 @@ FROM debian:bookworm | |||||||
| 
 | 
 | ||||||
| COPY bt.sh /bt.sh | COPY bt.sh /bt.sh | ||||||
| 
 | 
 | ||||||
| # 切换 Debian 镜像源为腾讯云源 |  | ||||||
| RUN sed -i 's/deb.debian.org/mirrors.tencent.com/g' /etc/apt/sources.list.d/debian.sources |  | ||||||
| 
 |  | ||||||
| # 设置构建参数 | # 设置构建参数 | ||||||
| ARG RANDOM_NAME | ARG RANDOM_NAME | ||||||
| 
 | 
 | ||||||
| # 设置一个btd12-前缀的随机主机名 | # 设置一个btd12-前缀的随机主机名 | ||||||
| RUN echo "btd12-${RANDOM_NAME}" > /etc/hostname | RUN echo "btd12-${RANDOM_NAME}" > /etc/hostname | ||||||
| 
 | 
 | ||||||
| # 更新包列表并安装前置依赖及宝塔面板 | # 更新包列表 | ||||||
| RUN apt-get update \ | RUN apt update | ||||||
|     && apt-get install -y wget iproute2 openssh-server libgd-dev cmake make gcc g++ autoconf \ | RUN apt upgrade -y | ||||||
|     libsodium-dev libonig-dev libssh2-1-dev libc-ares-dev libaio-dev sudo curl \ | 
 | ||||||
|     && curl -sSO https://download.bt.cn/install/install_panel.sh \ | # 安装前置依赖 | ||||||
|     && echo y|bash install_panel.sh -P 8888 --ssl-disable \ | RUN apt install -y wget iproute2 openssh-server libgd-dev cmake make gcc g++ autoconf \ | ||||||
|     && curl -o /www/server/panel/install/lib.sh https://download.bt.cn/install/0/lib.sh && sh /www/server/panel/install/lib.sh \ |     libsodium-dev libonig-dev libssh2-1-dev libc-ares-dev libaio-dev sudo curl | ||||||
|     && echo btpanel|bt 6 \ | 
 | ||||||
|     && echo btpaneldocker|bt 5 \ | # 下载并安装宝塔面板 | ||||||
|     && echo "/btpanel" > /www/server/panel/data/admin_path.pl \ | RUN curl -sSO https://download.bt.cn/install/install_panel.sh \ | ||||||
|     && echo "root:btpaneldocker" | chpasswd \ |     && echo y | bash install_panel.sh -P 8888 --ssl-disable | ||||||
|     && chmod +x /bt.sh \ | 
 | ||||||
|     && apt-get clean \ | # 下载并执行 lib.sh 脚本 | ||||||
|     && rm -rf /var/lib/apt/lists/* \ | RUN curl -o /www/server/panel/install/lib.sh https://download.bt.cn/install/0/lib.sh \ | ||||||
|     && echo "dk_lib_test_d12" > /www/server/panel/data/o.pl |     && sh /www/server/panel/install/lib.sh | ||||||
|  | 
 | ||||||
|  | # 配置宝塔面板安全入口和用户名及密码 | ||||||
|  | RUN echo btpanel | bt 6 \ | ||||||
|  |     && echo btpaneldocker | bt 5 \ | ||||||
|  |     && echo "/btpanel" > /www/server/panel/data/admin_path.pl | ||||||
|  | 
 | ||||||
|  | # 设置 root 用户密码 | ||||||
|  | RUN echo "root:btpaneldocker" | chpasswd | ||||||
|  | 
 | ||||||
|  | # 赋予 bt.sh 可执行权限 | ||||||
|  | RUN chmod +x /bt.sh | ||||||
|  | 
 | ||||||
|  | # 清理缓存 | ||||||
|  | RUN apt-get clean \ | ||||||
|  |     && rm -rf /var/lib/apt/lists/* | ||||||
|  | 
 | ||||||
|  | # 设置标识文件 | ||||||
|  | RUN echo "dk_lib_test_d12" > /www/server/panel/data/o.pl | ||||||
| 
 | 
 | ||||||
| ENTRYPOINT ["/bin/sh","-c","/bt.sh"] | ENTRYPOINT ["/bin/sh","-c","/bt.sh"] | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 xiao
						xiao