下载docker
安装yum的工具包
yum install yum-utils
配置国内docker的yum源(阿里云)
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
安装docker-ce docker命令行工具
yum install docker-ce docker-ce-cli containerd.io -y
docker ps是查看正在运行的镜像
docker images是查看所有已经下载的镜像
开启onlyoffice:
docker run -i -t -d -p 9002:9002 -p 443:443 --name onlyoffice9 --restart=always -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data -e JWT_SECRET=my_jwt_secret onlyoffice6:latest
[root@ecs-353585 onlyoffice]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
onlyoffice/documentserver latest 01da3778d001 3 months ago 3.34GB
[root@ecs-353585 onlyoffice]# docker run -i -t -d -p 9002:9002 -p 443:443 --name onlyoffice9 --restart=always -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data -e JWT_SECRET=my_jwt_secret onlyoffice:latest
Unable to find image 'onlyoffice:latest' locally
docker: Error response from daemon: pull access denied for onlyoffice, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
[root@ecs-353585 onlyoffice]# docker run -i -t -d -p 9002:9002 -p 443:443 --name onlyoffice9 --restart=always -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data -e JWT_SECRET=my_jwt_secret onlyoffice/documentserver:latest
ec4af97a59c3b3ad1d45e4a8b6c19be9d083ae4cf10fe90c6151b9b59a395e25
[root@ecs-353585 onlyoffice]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ec4af97a59c3 onlyoffice/documentserver:latest "/app/ds/run-documen…" 12 seconds ago Up 9 seconds 0.0.0.0:443->443/tcp, :::443->443/tcp, 80/tcp, 0.0.0.0:9002->9002/tcp, :::9002->9002/tcp onlyoffice9
[root@ecs-353585 onlyoffice]#