-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c683349
Showing
397 changed files
with
18,978 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# baota-paner 宝塔面板 | ||
此镜像是是基于centos,run起来,安装宝塔面板,commit成的镜像 | ||
|
||
> run centos镜像 | ||
```bash | ||
# 宿主机 | ||
docker run -i -t -d --privileged=true -p 20:20 -p 21:21 -p 80:80 -p 443:443 -p 888:888 -p 8888:8888 centos:7.2.1511 | ||
|
||
docker ps | ||
|
||
docker exec -it XXXXX bash | ||
|
||
``` | ||
> 安装宝塔面板 | ||
```bash | ||
# 容器 | ||
yum install -y initscripts | ||
# 安装宝塔 | ||
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh | ||
|
||
``` | ||
安装完了就可以看到账户名密码 | ||
|
||
```bash | ||
Bt-Panel: http://221.224.11.234:8888 | ||
username: admin | ||
password: 98617c88 | ||
``` | ||
停止宝塔服务,添加docker的启动脚本 | ||
``` | ||
service bt stop | ||
chmod -R 766 /www | ||
echo 'service bt start && sleep 10000000000000000000000000000000' > /bootstrap.sh | ||
chmod +x /bootstrap.sh | ||
``` | ||
> commit成镜像 | ||
```bash | ||
# 将面板的初始数据共享出来,启动的时候再挂载进去 | ||
docker cp XXX(containerId):/www . | ||
docker commit XXX(containerId) baota:XXXXXX(password) | ||
``` | ||
|
||
## run container | ||
```bash | ||
docker run --rm -d -p 20:20 -p 21:21 -p 80:80 -p 443:443 -p 888:888 -p 8888:8888 -v $PWD/www:/www chenzhuoqi/baota:5.1-64b0dfc8 bash /bootstrap.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# baota-paner 宝塔面板 | ||
## How to run | ||
```bash | ||
docker run --rm -d -p 20:20 -p 21:21 -p 80:80 -p 443:443 -p 888:888 -p 8888:8888 -v $PWD/www:/www chenzhuoqi/baota:5.1-64b0dfc8 bash /bootstrap.sh | ||
# or | ||
docker-compose up -d | ||
|
||
``` | ||
## How to visit | ||
url:http://yourip:8888 | ||
username:admin | ||
password:64b0dfc8 | ||
|
||
## How to persist data | ||
www 目录是宝塔初始化需要的目录,将其挂载到容器里面,数据持久化 | ||
|
||
--------- | ||
## How to build | ||
此镜像是是基于centos,run起来,安装宝塔面板,commit成的镜像 | ||
|
||
> run centos镜像 | ||
```bash | ||
# 宿主机 | ||
docker run -i -t -d -p 20:20 -p 21:21 -p 80:80 -p 443:443 -p 888:888 -p 8888:8888 -v $PWD/www:/www centos | ||
|
||
docker ps | ||
|
||
docker exec -it XXXXX bash | ||
|
||
``` | ||
> 安装宝塔面板 | ||
```bash | ||
# 容器 | ||
yum install -y initscripts | ||
# 安装宝塔 | ||
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh | ||
|
||
``` | ||
安装完了就可以看到账户名密码 | ||
|
||
```bash | ||
Bt-Panel: http://123.207.182.84:8888 | ||
username: admin | ||
password: XXXXXX | ||
``` | ||
停止宝塔服务,添加docker的启动脚本 | ||
``` | ||
service bt stop | ||
echo 'service bt start && sleep 10000000000000000000000000000000' > /bootstrap.sh | ||
chmod +x /bootstrap.sh | ||
``` | ||
> commit成镜像 | ||
```bash | ||
docker commit XXX(containerId) baota:XXXXXX(password) | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
baotamiaban: | ||
image: chenzhuoqi/baota:centos7.2-98617c88 | ||
ports: | ||
- 20:20 | ||
- 21:21 | ||
- 80:80 | ||
- 443:443 | ||
- 888:888 | ||
- 8888:8888 | ||
volumes: | ||
- ./www:/www | ||
privileged: true | ||
command: bash /bootstrap.sh |
Binary file not shown.
Oops, something went wrong.