1、docker安装
#下载镜像
[root@localhost ~]# docker pull ccr.ccs.tencentyun.com/discuzq/dzq:latest
Trying to pull repository ccr.ccs.tencentyun.com/discuzq/dzq ...
latest: Pulling from ccr.ccs.tencentyun.com/discuzq/dzq
171857c49d0f: Pull complete
419640447d26: Pull complete
61e52f862619: Pull complete
20d3a68d0ff3: Pull complete
74aa5d060c4f: Pull complete
63ee9725cb1b: Pull complete
b844621327df: Pull complete
Digest: sha256:4d0bb5e9caabbbf264ce01344d68f31adc190ec3910f28d6ced2a82cdc10bac4
Status: Downloaded newer image for ccr.ccs.tencentyun.com/discuzq/dzq:latest
[root@localhost ~]# docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
ccr.ccs.tencentyun.com/discuzq/dzq latest ebcc34c2c760 4 days ago 659 MB
#运行容器,-d参数是后台运行,-p 映射本地端口:容器内部端口。然后查看容器运行状态。
[root@localhost ~]# docker run -d -p 80:80 -p 443:443 ccr.ccs.tencentyun.com/discuzq/dzq:latest
93f43a170321765ba73e6eef6f33604a3bebdb67caf75971c85998a92f4a8550
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
93f43a170321 ccr.ccs.tencentyun.com/discuzq/dzq:latest "/usr/sbin/supervi..." 3 minutes ago
说明:镜像集成全套环境,可以使用外部mysql,也可以使用内部自带默认mysql。
此时若使用浏览器访问主机地址发现打不开。说明容器内的nginx服务未启动,我们需要进入容器内启动服务,exec的-it参数 -i是保持STDIN连接,-t是分配一个tty终端,93f43a170321是指容器的ID,也可以在run的时候 --name指定一个容器名称,然后使用容器名称去执行
[root@localhost ~]# docker exec -it 93f43a170321 /bin/bash
root@93f43a170321:/# service nginx start
* Starting nginx nginx
2、访问系统安装页面
访问 http://主机地址/admin 可以进入站点后台管理界面,管理员就是站长
标签:Pull,complete,com,discuz,dzq,docker,tencentyun,安装 From: https://www.cnblogs.com/chuanghongmeng/p/17577792.html