1.离线安装linux系统
2.离线安装docker
3.导入离线包(离线镜像制作)
docker pull onlyoffice/documentserver
命令直接在线拉取镜像
拉取官方镜像后,直接导出镜像为离线包
如果拉取镜像后,运行run命令后的叫容器,容器里可以修改,修改后的容器,要先保存人容器,再导出离线包。docker commit 18b(这个是容器id) fei6onlyoffice/documentserver
——这个命令是保存容器docker save -o fei6onlyoffice.tar fei6onlyoffice/documentserver
——这个命令是导出离线包docker commit
将修改后镜像保存到本地,参数是容器ID,新名字:版本标志
docker load < fei6onlyoffice.tar
命令导入离线镜像
导入后用命令docker images查看导入后变成了什么名字的镜像,如,下文中的fei6onlyoffice/documentserver
4.启动onlyoffice
启动——映射至9000端口docker run -i -t -d -p 9000:80 --restart=always fei6onlyoffice/documentserver
如果机器重启后,不要用docker run
命令,要用docker start 容器id
5.用engineercms调用onlyoffice进行协作
- 在conf文件夹里配置app.conf文件后启动engineercms即可。
centos7-linux安装docker(离线方式)
下载docker的安装文件
https://download.docker.com/linux/static/stable/x86_64/
下载的是:docker-20.10.7.tgz 这个压缩文件
将docker-20.10.7.tgz文件上传到centos7-linux系统上,用ftp工具上传即可
解压
[root@localhost java]# tar -zxvf docker-20.10.7.tgz
将解压出来的docker文件复制到 /usr/bin/ 目录下
[root@localhost java]# cp docker/* /usr/bin/
进入/etc/systemd/system/目录,并创建docker.service文件
[root@localhost java]# cd /etc/systemd/system/
[root@localhost system]# touch docker.service
打开docker.service文件,将以下内容复制
[root@localhost system]# vi docker.service
注意: –insecure-registry=192.168.200.128 此处改为你自己服务器ip
[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 --selinux-enabled=false --insecure-registry=192.168.200.128
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
给docker.service文件添加执行权限
[root@localhost system]# chmod 777 /etc/systemd/system/docker.service
重新加载配置文件(每次有修改docker.service文件时都要重新加载下)
[root@localhost system]# systemctl daemon-reload
启动
[root@localhost system]# systemctl start docker
设置开机启动
[root@localhost system]# systemctl enable docker.service
查看docker状态
[root@localhost system]# systemctl status docker
出现下面这个界面就代表docker安装成功。
配置镜像加速器,默认是到国外拉取镜像速度慢,可以配置国内的镜像如:阿里、网易等等。下面配置一下网易的镜像加速器。打开docker的配置文件: /etc/docker/daemon.json文件:
[root@localhost docker]# vi /etc/docker/daemon.json
配置如下:
{“registry-mirrors”: [“http://hub-mirror.c.163.com", “https://docker.mirrors.ustc.edu.cn"]}
配置完后:wq保存配置并重启docker 一定要重启不然加速是不会生效的!!!
[root@localhost docker]# service docker restart
————————————————
版权声明:本文为CSDN博主「一只扫地僧」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_36403831/article/details/122669368
docker出现问题
https://www.cnblogs.com/FlyGoldfish/articles/16083946.htmlsystemctl restart docker
重启docker
[root@localhost ~]# docker stop 879
879
[root@localhost ~]# docker start 879
Error response from daemon: driver failed programming external connectivity on endpoint eager_lalande (5ed72e3a8fa6b70d65c760388013ece1a77a818c39e57ed8b8d720393cefa58a): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 9000 -j DNAT --to-destination 172.17.0.2:80 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1))
Error: failed to start containers: 879
[root@localhost ~]# docker run -i -t -d -p 9000:80 --restart=always fei620onlyoffice/documentserver
01b845beb144adee8b8ad2fdf0cefe210ca5833c3c2404cc8bf06866a33bde7b
docker: Error response from daemon: driver failed programming external connectivity on endpoint silly_mirzakhani (25dc94e67bcf61c55f50236ba384f71049cac6cabfc08b3e776e0bcadccc0639): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 9000 -j DNAT --to-destination 172.17.0.2:80 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1)).
[root@localhost ~]# sudo service docker status
Redirecting to /bin/systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since 一 2024-09-09 22:41:22 CST; 1 months 22 days ago
Docs: https://docs.docker.com
Main PID: 1108 (dockerd)
Tasks: 34
Memory: 401.2M
CGroup: /system.slice/docker.service
├─1108 /usr/bin/dockerd
└─1737 docker-containerd --config /var/run/docker/containerd/containerd.toml
11月 01 12:45:10 localhost.localdomain dockerd[1108]: time="2024-11-01T12:45:10.963408819+08:00" level=error msg="Handler for POST /v...
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]# systemctl restart docker
[root@localhost ~]# docker start 879
879
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
01b845beb144 fei620onlyoffice/documentserver "/app/ds/run-documen…" 3 minutes ago Created silly_mirzakhani
879eeedd1ddf fei620onlyoffice/documentserver "/app/ds/run-documen…" 11 months ago Up 57 seconds 443/tcp, 0.0.0.0:9000->80/tcp eager_lalande
ea98010d49a2 webterminal/magick "bash" 3 years ago Exited (0) 2 years ago quirky_chatterjee
onlyoffice表格中鼠标与单元格错位
https://forum.onlyoffice.com/t/topic/11116
8.2版本解决
最后编辑:秦晓川 更新时间:2024-11-22 18:38