最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Ubuntu 20.04 上安裝和使用 Docker的詳細(xì)過程(安裝包)

 更新時間:2022年03月03日 10:16:29   作者:久末丶  
這篇文章主要介紹了Ubuntu 20.04 上安裝和使用 Docker的詳細(xì)過程(安裝包),本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下

安裝前將所有的軟件包上傳到系統(tǒng)的/opt路徑,所有的操作都在/opt目錄下

一、解壓文件

tar -xzvf docker-19.03.0.tgz

二、拷貝解壓后的文件到/usr/bin/下面

cp docker/* /usr/bin/

三、加入系統(tǒng)文件

cat >/etc/systemd/system/docker.service <<-EOF
[Unit]
Description=Docker Application Container Engine
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
EOF

四、啟動Docker

systemctl daemon-reload && systemctl start docker && systemctl enable docker.service

五、Docker配置文件

編輯daemon.json文件輸入以下內(nèi)容

vim /etc/docker/daemon.json
{
    "log-driver":"json-file",
    "log-opts":{
        "max-size" :"10m","max-file":"4"
    },
    "registry-mirrors": ["https://6kx4zyno.mirror.aliyuncs.com"]
}

六、重啟Docker

systemctl restart docker 

七、檢查Docker是否安裝成功

docker --version

八、總結(jié)

我們已經(jīng)向你展示如何在 Ubuntu 20.04 機(jī)器上安裝 Docker。

想要學(xué)習(xí)更多關(guān)于 Docker 的信息,查閱官方 Docker 文檔。

到此這篇關(guān)于Ubuntu 20.04 上安裝和使用 Docker的詳細(xì)過程(安裝包)的文章就介紹到這了,更多相關(guān)Ubuntu 20.04使用 Docker內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論

井陉县| 阳西县| 交城县| 克什克腾旗| 会昌县| 紫云| 罗田县| 平谷区| 德昌县| 霍林郭勒市| 达尔| 乳山市| 健康| 周宁县| 墨竹工卡县| 奉新县| 桃园市| 五大连池市| 工布江达县| 保定市| 河曲县| 沁源县| 闵行区| 建德市| 牡丹江市| 光山县| 兰考县| 垦利县| 中山市| 云梦县| 桓台县| 吉林市| 高邑县| 甘泉县| 三原县| 科尔| 彝良县| 玛多县| 曲松县| 凤庆县| 诏安县|