例如docker 安装 onlyoffice
docker run -i -t -d -p 8085:80 --restart=always
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql
onlyoffice/documentserver:7.0
在dockercomposerize网站 进行转换
上面经过转换为以下代码。
version: '3.3'
services:
documentserver:
ports:
- '8085:80'
restart: always
volumes:
- '/app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice'
- '/app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data'
- '/app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice'
- '/app/onlyoffice/DocumentServer/db:/var/lib/postgresql'
image: 'onlyoffice/documentserver:7.0 '
直接使用docker-compose 命令运行即可