国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

3分鐘學會ubuntu中安裝docker

這篇具有很好參考價值的文章主要介紹了3分鐘學會ubuntu中安裝docker。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

網(wǎng)上安裝docker教程很多,但是年代久遠,現(xiàn)在提供docker官方最佳、最簡安裝教程。

一、系統(tǒng)要求

以下系統(tǒng)環(huán)境被測試過

  • Ubuntu Lunar 23.04
  • Ubuntu Kinetic 22.10
  • Ubuntu Jammy 22.04 (LTS)
  • Ubuntu Focal 20.04 (LTS)

二、卸載老版本docker

一些發(fā)行版本的linux系統(tǒng)可能存在非官方發(fā)布的docker相關組件,這里把它們卸載干凈,
不然出現(xiàn)版本沖突會很麻煩。

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

三、命令行安裝docker

3.1、設置docker軟件源

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

# Add the repository to Apt sources:
echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

3.2、安裝最新版

執(zhí)行下面明令安裝就OK

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

靜靜等他安裝玩就行。安裝過程打印信息如下:

root@DESKTOP-UDK350B:~# sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  dbus-user-session docker-ce-rootless-extras libltdl7 libslirp0 pigz slirp4netns
Suggested packages:
  aufs-tools cgroupfs-mount | cgroup-lite
The following NEW packages will be installed:
  containerd.io dbus-user-session docker-buildx-plugin docker-ce docker-ce-cli
  docker-ce-rootless-extras docker-compose-plugin libltdl7 libslirp0 pigz slirp4netns
0 upgraded, 11 newly installed, 0 to remove and 102 not upgraded.
Need to get 114 MB of archives.
After this operation, 409 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu jammy/universe amd64 pigz amd64 2.6-1 [63.6 kB]    
Get:2 https://download.docker.com/linux/ubuntu jammy/stable amd64 containerd.io amd64 1.6.24-1 [28.6 MB]
Get:3 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-buildx-plugin amd64 0.11.2-1~ubuntu.22.04~jammy [28.2 MB]
Get:4 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-ce-cli amd64 5:24.0.7-1~ubuntu.22.04~jammy [13.3 MB]                                                                 
Ign:1 http://archive.ubuntu.com/ubuntu jammy/universe amd64 pigz amd64 2.6-1                                                                                                                  
Get:5 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 dbus-user-session amd64 1.12.20-2ubuntu4.1 [9442 B]                                                                           
Get:6 http://archive.ubuntu.com/ubuntu jammy/main amd64 libltdl7 amd64 2.4.6-15build2 [39.6 kB]                                                                                               
Get:7 http://archive.ubuntu.com/ubuntu jammy/main amd64 libslirp0 amd64 4.6.1-1build1 [61.5 kB]                                                                                               
Get:8 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-ce amd64 5:24.0.7-1~ubuntu.22.04~jammy [22.6 MB]                                                                     
Get:9 http://archive.ubuntu.com/ubuntu jammy/universe amd64 slirp4netns amd64 1.0.1-2 [28.2 kB]                                                                                               
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link

3.3、驗證

sudo docker run hello-world

以上命令下載測試鏡像,并生成容器。 當容器運行時,它會成功打印消息并退出,表明安裝OK,bash終端打印信息如下:

root@DESKTOP-UDK350B:~# sudo docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

四、參考

[0] https://docs.docker.com/engine/install/ubuntu/文章來源地址http://www.zghlxwxcb.cn/news/detail-728962.html

到了這里,關于3分鐘學會ubuntu中安裝docker的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。如若轉載,請注明出處: 如若內容造成侵權/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領支付寶紅包贊助服務器費用

相關文章

  • 在服務器的docker容器中安裝Anaconda配置環(huán)境以及使用編程工具遠程連接環(huán)境

    在服務器的docker容器中安裝Anaconda配置環(huán)境以及使用編程工具遠程連接環(huán)境

    一、連接服務器下載Anaconda 3 使用win+r輸入cmd打開命令行,在命令行中輸入ssh -p xxxxx(你的端口號如10101,下圖紅色部分)? root@xxx.xxx.xxx.xxx(服務器ip地址下圖藍色部分) ? 第一次連接時,連接沒問題會出現(xiàn)Are you sure you want to continue connecting (yes/no/[fingerprint])?之后就不會出現(xiàn)了。 輸

    2024年02月03日
    瀏覽(26)
  • ubuntu20.04中安裝配置docker nvidia容器來實現(xiàn)宿主機GPU的調用

    在 Ubuntu 上安裝 Docker 非常直接。我們將會啟用 Docker 軟件源,導入 GPG key,并且安裝軟件包。 (這里指推薦使用官方的安裝方法,snap的方法不推薦,各種命令不是很通用) 1、首先,更新軟件包索引,并且安裝必要的依賴軟件,來添加一個新的 HTTPS 軟件源: 2、使用下面的

    2024年03月16日
    瀏覽(23)
  • 在Linux環(huán)境中安裝配置Django與PostgreSQL數(shù)據(jù)庫

    Django是一款功能強大的Python Web框架,而PostgreSQL是一個開源的高級關系型數(shù)據(jù)庫系統(tǒng)。本文將介紹在Linux環(huán)境中如何安裝和配置Django與PostgreSQL數(shù)據(jù)庫,幫助您搭建一個完整的開發(fā)環(huán)境。 第一步:安裝Django和PostgreSQL 安裝Python環(huán)境:首先確保您的Linux系統(tǒng)中已經(jīng)安裝了Python,可以

    2024年02月16日
    瀏覽(23)
  • 一分鐘學會Docker

    啟動docker 啟動可視化 重新啟動防火墻 可以忽略 防火墻開放2375docker端口 關閉防火墻 ifconfig 查ip+可視化端口9000 訪問網(wǎng)頁Portainer可視化操作 重啟docker 無需執(zhí)行 查看所有容器 啟動容器 后面加名稱便于查看 Docker run -d *docker.io/xxxx* 進入容器 啟動項目容器 查看啟動容器 重啟網(wǎng)卡

    2024年02月16日
    瀏覽(14)
  • 工具系列(九) 本文(2萬字) | 在ubuntu中安裝docker教程 | 在Linux下Docker將鏡像導出 | 上傳至服務器 | 部署并創(chuàng)建容器 |

    點擊進入專欄: 《人工智能專欄》 Python與Python | 機器學習 | 深度學習 | 目標檢測 | YOLOv5及其改進 | YOLOv8及其改進 | 關鍵知識點 | 各種工具教程

    2024年01月19日
    瀏覽(106)
  • 三分鐘學會使用 Docker 部署前端項目

    三分鐘學會使用 Docker 部署前端項目

    本篇文章帶領讀者利用Docker+XShell+阿里云服務器進行簡單的前端網(wǎng)頁部署。筆者用到的環(huán)境如下: 本機操作系統(tǒng):Windows 10(因此直接安裝 Docker Desktop,圖形化操作,較為方便) 云服務器:阿里云 2核 2G(Ubantu) 一些本人參考的資料整理: Docker中文文檔:Docker — 從入門到實

    2024年02月22日
    瀏覽(16)
  • 一分鐘學會Linux軟鏈接

    軟鏈接,也稱為符號鏈接,是類 Unix 操作系統(tǒng)中的一項強大功能,允許您創(chuàng)建對文件和目錄的引用。軟鏈接類似于圖形用戶界面中的快捷方式,但在文件系統(tǒng)級別運行。在本文中,我們將重點介紹如何創(chuàng)建指向目錄的軟鏈接,探索其好處并提供分步說明。 軟鏈接是對重定向到

    2024年01月22日
    瀏覽(24)
  • 進階Docker3:Dokerfile構建鏡像

    進階Docker3:Dokerfile構建鏡像

    目錄 Dockerfile 構建基礎鏡像 基本機構 命令: 命令解釋: 準備工作 創(chuàng)建鏡像 上傳鏡像 Dockerfile 是一個文本格式的配置文件, 用戶可以使用 Dockerfile 來快速創(chuàng)建自定義的鏡像,另外,使 用Dockerfile 去構建鏡像好比使用 pom 去構建 maven 項目一樣,有異曲同工之妙。 centos alpine

    2024年02月01日
    瀏覽(8)
  • 【Redis從頭學 -1】17張圖帶你學會Redis多環(huán)境(Linux、Windows)安裝與配置

    【Redis從頭學 -1】17張圖帶你學會Redis多環(huán)境(Linux、Windows)安裝與配置

    ?????作者名稱:DaenCode ??作者簡介:啥技術都喜歡搗鼓搗鼓,喜歡分享技術、經(jīng)驗、生活。 ??人生感悟:嘗盡人生百味,方知世間冷暖。 ??所屬專欄:Redis從頭學 Windows下載地址 Linux下載地址 https://github.com/microsoftarchive/redis/releases https://redis.io/download/ windows下載 linux下載

    2024年02月12日
    瀏覽(44)
  • 一分鐘學會MobaXterm當Linux客戶端使用

    一分鐘學會MobaXterm當Linux客戶端使用

    MobaXterm是一款功能強大的遠程計算機管理工具,它集成了各種網(wǎng)絡工具和遠程連接協(xié)議,可以幫助用戶在Windows系統(tǒng)上輕松管理遠程計算機。MobaXterm支持SSH、Telnet、RDP、VNC等多種遠程連接協(xié)議,同時還集成了X11服務器,可以實現(xiàn)遠程圖形化界面操作。此外,MobaXterm還具有文件傳

    2024年02月22日
    瀏覽(14)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領取紅包,優(yōu)惠每天領

二維碼1

領取紅包

二維碼2

領紅包