<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      Debian 安裝 Docker

      卸載已有 Docker

      如果你之前安裝過 Docker Engine 之前,你需要卸載舊版本,避免沖突:

      for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
      

      安裝方法

      使用官方安裝腳本自動安裝 (推薦使用)

      1. 下載官方腳本

         curl -fsSL https://get.docker.com -o get-docker.sh
        
      2. 執行腳本

        sudo sh get-docker.sh
        

      官方 apt 源安裝

      如果你的網絡無法連接到官方網站的話,那可以使用 apt 源手動安裝

      1. 更新 apt 源

        sudo apt update -y  # 更新 apt 緩存
        

        如果你的服務器長時間未更新,建議使用 sudo apt upgrade -y 更新一下軟件版本 注意:生產環境不要執行這個操作,除非你確定軟件升級沒有影響

      2. 安裝下載 https 依賴包

        sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
        
      3. 添加 官方 GPC 密鑰

        sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc # 下載 GPC 密鑰到本地
        
        sudo chmod a+r /etc/apt/keyrings/docker.asc  # 將 GPC 密鑰文件的讀取權限添加給所有用戶
        
      4. 添加 Docker 官方倉庫

        添加 apt 源到本地倉庫

        echo  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
          $(. /etc/os-release && echo "$VERSION_CODENAME") stable" |  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
        
      5. 更新 apt 緩存以保障使用步驟4添加源

        sudo apt update -y
        
      6. 驗證倉庫添加成功

        執行以下命令查看返回結果

        apt-cache policy docker-ce
        

        如果返回的結果包含https://download.docker.com/linux/debian,則是添加成功。

      7. 安裝 Docker

        sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
        

      清華源 apt 安裝

      **具體操作可以參照:替換Debian清華源 清華源-Docker CE 軟件倉庫

      1. 更換 apt 源為清華源

        sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak  # 備份原有 apt源
        
        1. 如果你的 Debian 版本是 12,則執行以下命令(注意:下面是一行命令,不要單獨執行

          sudo tee /etc/apt/sources.list << EOF
          # 默認注釋了源碼鏡像以提高 apt update 速度,如有需要可自行取消注釋
          deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
          # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
          
          deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
          # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
          
          deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
          # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
          
          # 以下安全更新軟件源包含了官方源與鏡像站配置,如有需要可自行修改注釋切換
          deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
          # deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
          EOF
          
        2. 如果你的 Debian 版本是 11,則執行以下命令(注意:下面是一行命令,不要單獨執行

          sudo tee /etc/apt/sources.list << EOF
          # 默認注釋了源碼鏡像以提高 apt update 速度,如有需要可自行取消注釋
          deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
          # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
          
          deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
          # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
          
          deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
          # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
          
          # 以下安全更新軟件源包含了官方源與鏡像站配置,如有需要可自行修改注釋切換
          deb https://security.debian.org/debian-security bullseye-security main contrib non-free
          # deb-src https://security.debian.org/debian-security bullseye-security main contrib non-free
          EOF
          
      2. 安裝驗證密鑰依賴

        sudo apt update -y # 更新緩存
        sudo apt install -y curl gnupg2  # 安裝依賴
        
      3. 添加清華源 Docker GPC 密鑰

        curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian/gpg |sudo apt-key add -
        
      4. 添加清華 Docker 源

        echo  "deb https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null  
        
      5. 更新 apt 緩存以保障使用步驟4添加源

        sudo apt update -y
        
      6. 安裝 Docker

        sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
        

      啟動并驗證 Docker

      1. 啟動 Docker 設置開機啟動

        sudo systemctl start docker # 啟動 Docker
        sudo systemctl enable docker # 設置開機啟動
        
      2. 查看 Docker 版本

        sudo docker --version
        
      3. 拉取 測試鏡像驗證

        sudo docker run hello-world
        

      取消非 root 用戶需要 sudo

      1. 創建 docker 組

        sudo groupadd docker
        
      2. 將當前用戶加入 docker 組

        sudo usermod -aG docker $USER
        

        如果給其他用戶添加權限則把 $USER 修改為用戶名,例如: zhangsan

        sudo usermod -aG docker zhangsan
        
      3. 刷新docker成員

        newgrp docker
        
      4. 重啟服務

        sudo systemctl restart docker # 重啟 docker
        
      5. 驗證

        docker ps -a
        

      卸載 Docker

      1. 卸載 Docker

        for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
        
      2. 刪除 Docker 目錄

        sudo rm -rf /var/lib/docker
        
      posted @ 2025-01-15 16:51  神奇小寶  閱讀(2506)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 亚洲一区二区中文av| 大肉大捧一进一出好爽视频mba| 亚洲熟少妇一区二区三区| 久久久久亚洲AV成人片一区| 少妇精品导航| а∨天堂一区中文字幕| 国产精品亚洲综合久久小说| 手机看片日本在线观看视频| 大地资源中文第三页| 久久精品国产91精品亚洲| 无码熟妇人妻av影音先锋| 樱桃视频影院在线播放| 亚洲AV无码东方伊甸园| 国产毛片精品一区二区色| 青青青青国产免费线在线观看| 日韩中文字幕有码av| 亚洲成av人片天堂网无码 | 欧美人与禽2o2o性论交| 老鸭窝在线视频| 成人国产乱对白在线观看| 精品久久综合日本久久网| 久久国产精品77777| 2020国产欧洲精品网站| 亚洲码欧洲码一二三四五| 尹人香蕉久久99天天拍欧美p7| 欧美人妻在线一区二区| 极品无码国模国产在线观看| 国产精品亚欧美一区二区三区| 久久精品一本到99热免费| 亚洲国产亚洲国产路线久久| 国产超碰无码最新上传| 日本丰满的人妻hd高清在线| 嫩b人妻精品一区二区三区| 国产午夜精品福利视频| 欧美一区二区三区久久综合| 亚洲国产精品无码观看久久| 潮喷失禁大喷水无码| 亚洲人成色77777| 国产乱对白刺激视频| 国产成年码AV片在线观看 | 日本三级香港三级三级人妇久|