下面命令作用:拉取镜像、映射宿主机端口和docker内部端口、创建宿主机和docker容器挂载目录、拉取指定版本的onlyoffice/documentserver
sudo docker run -i -t -d -p 8088:80 \
-v /app/onlyoffice7/DocumentServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice7/DocumentServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice7/DocumentServer/lib:/var/lib/onlyoffice \
-v /app/onlyoffice7/DocumentServer/rabbitmq:/var/lib/rabbitmq \
-v /app/onlyoffice7/DocumentServer/redis:/var/lib/redis \
-v /app/onlyoffice7/DocumentServer/db:/var/lib/postgresql onlyoffice/documentserver:7.1.1
执行命令
docker ps
[root@VM-24-10-centos ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
58f75f6ca6f7 onlyoffice/documentserver:7.1.1 "/app/ds/run-docum..." 2 minutes ago Up 2 minutes 443/tcp, 0.0.0.0:8088->80/tcp elastic_pare
sudo docker exec 58f75f6ca6f7 sudo supervisorctl start ds:example
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload
http://ip地址:8088
点击GO TO TEST EXAMPLE
测试页面