前言
docker 離線安裝onlyoffice,如在線安裝可直接跳過(guò)導(dǎo)出導(dǎo)入鏡像步驟,拉取后直接運(yùn)行。
1. 安裝Docker容器
- 下載文件
wget https://download.docker.com/linux/static/stable/x86_64/docker-19.03.9.tgz
- 解壓
把壓縮文件存在指定目錄下,并進(jìn)行解壓
tar -xvf docker-19.03.6.tgz
- 將解壓出來(lái)的docker文件內(nèi)容移動(dòng)到 /usr/bin/ 目錄下
cp docker/\* /usr/bin/
4、將docker注冊(cè)為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、啟動(dòng)
systemctl daemon-reload
#重載unit配置文件
systemctl start docker
#啟動(dòng)Docker
systemctl enable docker.service
#設(shè)置開(kāi)機(jī)自啟
2. 拉取鏡像
- 搞個(gè)vmware,安裝docker后執(zhí)行
docker pull onlyoffice/documentserver
- 導(dǎo)出鏡像
- 查看要導(dǎo)出的鏡像
docker images
- 導(dǎo)出到當(dāng)前所在目錄
docker save 【鏡像id】 -o onlyoffice.tar
- 查看要導(dǎo)出的鏡像
- 導(dǎo)入到目標(biāo)服務(wù)器
docker load -i onlyoffice.tar
- 啟動(dòng)
docker run -i -t -d -p 80:80 --restart=always 【鏡像id】
此時(shí)拉取的是最新版本,docker inspect 不顯示版本號(hào),經(jīng)查詢?cè)摪姹究赡苁?.4.1 下載 ONLYOFFICE Docs | ONLYOFFICE
3. 驗(yàn)證
瀏覽器訪問(wèn)服務(wù)器ip即可 例如:http://172.17.10.136/
文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-635356.html
文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-635356.html
到了這里,關(guān)于linux onlyOffice docker 離線部署的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!