Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhuoqiatpatsnap committed Aug 30, 2017
0 parents commit c683349
Show file tree
Hide file tree
Showing 397 changed files with 18,978 additions and 0 deletions.
47 changes: 47 additions & 0 deletions Dockerfile.md
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
```
58 changes: 58 additions & 0 deletions README.md
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)
```


13 changes: 13 additions & 0 deletions docker-compose.yml
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 added www/server/panel/backupAll.pyc
Binary file not shown.
Loading

0 comments on commit c683349

Please sign in to comment.