当前位置: 首页 > news >正文

ubuntu20.04/22.04/24.04 docker 容器安装方法

ubuntu20.04/22.04/24.04 docker 容器安装方法:

1 Set up Docker’s apt repository.

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc# Add the repository to Apt sources:
echo \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullsudo apt-get update

2 To install the latest version, run:

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

3 Verify that the Docker Engine installation is successful by running the hello-world image.

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 theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare 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/

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • 借助大模型将文档转换为视频
  • 【测试开岗面试】知识点总结
  • JDBC笔记
  • UE5源码Windows编译、运行
  • 办了房屋抵押经营贷,空壳公司不怕被查吗?续贷不上怎么办?
  • Chrome谷歌浏览器登录账号next无反应
  • Renesas R7FA8D1BH (Cortex®-M85)控制SHT20
  • win+linux平台C语言获取进程的线程数量
  • 稠密向量检索、稀疏向量检索、BM25检索三者对比
  • 【Java】【力扣】83.删除排序链表中的重复元素
  • SAM 2: Segment Anything in Images and Videos
  • Android 车联网——汽车模块介绍(附1)
  • Vue3.5+ 侦听器的3个更新
  • Java高级Day43-类加载
  • python压缩图片的代码
  • 【391天】每日项目总结系列128(2018.03.03)
  • angular2 简述
  • canvas绘制圆角头像
  • MySQL QA
  • Python利用正则抓取网页内容保存到本地
  • webpack4 一点通
  • WinRAR存在严重的安全漏洞影响5亿用户
  • yii2权限控制rbac之rule详细讲解
  • yii2中session跨域名的问题
  • 从零开始的webpack生活-0x009:FilesLoader装载文件
  • 工作手记之html2canvas使用概述
  • 蓝海存储开关机注意事项总结
  • 力扣(LeetCode)21
  • 如何利用MongoDB打造TOP榜小程序
  • 实习面试笔记
  • 微信开放平台全网发布【失败】的几点排查方法
  • 线上 python http server profile 实践
  • 云栖大讲堂Java基础入门(三)- 阿里巴巴Java开发手册介绍
  • (3)nginx 配置(nginx.conf)
  • (Arcgis)Python编程批量将HDF5文件转换为TIFF格式并应用地理转换和投影信息
  • (笔记)Kotlin——Android封装ViewBinding之二 优化
  • (超简单)构建高可用网络应用:使用Nginx进行负载均衡与健康检查
  • (定时器/计数器)中断系统(详解与使用)
  • (过滤器)Filter和(监听器)listener
  • (三十五)大数据实战——Superset可视化平台搭建
  • (十六)一篇文章学会Java的常用API
  • (贪心 + 双指针) LeetCode 455. 分发饼干
  • (一)appium-desktop定位元素原理
  • (一)Kafka 安全之使用 SASL 进行身份验证 —— JAAS 配置、SASL 配置
  • (已更新)关于Visual Studio 2019安装时VS installer无法下载文件,进度条为0,显示网络有问题的解决办法
  • (转)3D模板阴影原理
  • (转)ORM
  • .form文件_一篇文章学会文件上传
  • .net core 依赖注入的基本用发
  • .Net CoreRabbitMQ消息存储可靠机制
  • .net 获取某一天 在当月是 第几周 函数
  • .NET 设计模式初探
  • .NET 使用配置文件
  • .net使用excel的cells对象没有value方法——学习.net的Excel工作表问题
  • .Net转Java自学之路—基础巩固篇十三(集合)