前言
docker 离线安装onlyoffice,如在线安装可直接跳过导出导入镜像步骤,拉取后直接运行。
1. 安装Docker容器
- 下载文件
wget https://download.docker.com/linux/static/stable/x86_64/docker-19.03.9.tgz
- 解压
把压缩文件存在指定目录下,并进行解压
tar -xvf docker-19.03.6.tgz
- 将解压出来的docker文件内容移动到 /usr/bin/ 目录下
cp docker/\* /usr/bin/
4、将docker注册为service
vim /etc/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
5、启动
systemctl daemon-reload
#重载unit配置文件
systemctl start docker
#启动Docker
systemctl enable docker.service
#设置开机自启
2. 拉取镜像
- 搞个vmware,安装docker后执行
docker pull onlyoffice/documentserver
- 导出镜像
- 查看要导出的镜像
docker images
- 导出到当前所在目录
docker save 【镜像id】 -o onlyoffice.tar
- 查看要导出的镜像
- 导入到目标服务器
docker load -i onlyoffice.tar
- 启动
docker run -i -t -d -p 80:80 --restart=always 【镜像id】
此时拉取的是最新版本,docker inspect 不显示版本号,经查询该版本可能是7.4.1 下载 ONLYOFFICE Docs | ONLYOFFICE
3. 验证
浏览器访问服务器ip即可 例如:http://172.17.10.136/
文章来源:https://www.toymoban.com/news/detail-635356.html
文章来源地址https://www.toymoban.com/news/detail-635356.html
到了这里,关于linux onlyOffice docker 离线部署的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!