国产化平台离线/在线安装 Docker 并安装 OnlyOffice(麒麟系统,非涉密专用机)

国产化平台离线/在线安装 Docker 并安装 OnlyOffice(麒麟系统,非涉密专用机)

离线安装

一、安装 Docker

1、直接到下面官网进行下载源文件

https://download.docker.com/linux/static/stable/aarch64/

往下翻找到 docker-24.0.6.tgz

2、安装

1
2
# 解压
tar -xvf docker-24.0.6.tgz
1
2
# 复制文件到  /usr/bin
cp ./docker/* /usr/bin
1
2
# 创建 docker.service 配置文件
vim /etc/systemd/system/docker.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# 写入以下内容

[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=127.0.0.1
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
1
2
# 添加执行权限
chmod +x /etc/systemd/system/docker.service
1
2
3
4
5
6
7
8
9
10
11
# 这时候就可以启动 Docker 了,下面列举 Docker 的常用命令
systemctl daemon-reload # 加载 docker.service
systemctl start docker # 启动 Docker
systemctl status docker # 查询 Docker 当前状态
systemctl enable docker.service # 设置开机自动启动
docker ps -a # 查看当前启动了哪些 Docker
docker logs [实例ID] # 查看某个实例日志
docker stop [实例ID] # 停止某个实例
docker rm [实例ID] # 删除某个实例(只有停止了才能删除)
docker images # 查看当前 Docker 安装的镜像
docker rmi [镜像ID] # 删除某个镜像

二、安装 OnlyOffice

1
2
# 导入 Docker 镜像
docker load -i onlyoffice-documentserver-arm64.tar
1
2
3
# 运行镜像
docker run -i -t -d -p 8081:80 -p 8082:443 --name onlyoffice --restart=always onlyoffice/documentserver
# 这个时候就可以在浏览器输入 localhost:8081 就可以访问 OnlyOffice 的网页了,但是如果访问不了的话建议使用 `docker logs` 看看实例状态,如果一切运行正常,就关闭防火墙试试。

在线安装

一、安装 Docker
1
2
3
4
5
6
# 安装
yum install docker -y
# 查看版本
docker version
# 启动
systemctl start docker
二、安装 OnlyOffice
1
2
docker run -i -t -d -p 8081:80 -p 8082:443  --name onlyoffice --restart=always onlyoffice/documentserver:latest-arm64
# 这时候他会检查是否有这个镜像,没有的话就会直接拉取,等待一切完成即可。

国产化平台离线/在线安装 Docker 并安装 OnlyOffice(麒麟系统,非涉密专用机)
https://tdsgpo.top/2023/12/23/国产化平台离线安装 Docker 并安装 OnlyOffice/
作者
DDS
发布于
2023年12月23日
许可协议