赞
踩
docker 离线安装onlyoffice,如在线安装可直接跳过导出导入镜像步骤,拉取后直接运行。
wget https://download.docker.com/linux/static/stable/x86_64/docker-19.03.9.tgz
把压缩文件存在指定目录下,并进行解压
tar -xvf docker-19.03.6.tgz
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
#设置开机自启
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】
浏览器访问服务器ip即可 例如:http://172.17.10.136/
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。