码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • docker————docker的安装


    目录

    docker的安装

    1、安装yum-utils工具

    2、安装yum仓库

    3、安装docker引擎

    4、设置开机启动,并立即启动

    5、测试


    docker的安装

    docker的官网Docker Docs

    我才用的linux版本是rocky,使用的是最小安装

    1、安装yum-utils工具

    [root@bogon yum.repos.d]# yum install -y yum-utils

    2、安装yum仓库

    1. [root@bogon ~]# sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
    2. Adding repo from: https://download.docker.com/linux/rhel/docker-ce.repo
    3. [root@bogon ~]# yum repolist
    4. repo id repo name
    5. appstream Rocky Linux 9 - AppStream
    6. baseos Rocky Linux 9 - BaseOS
    7. docker-ce-stable Docker CE Stable - x86_64
    8. extras Rocky Linux 9 - Extras

    3、安装docker引擎

    [root@bogon ~]# yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

    4、设置开机启动,并立即启动

    1. [root@bogon ~]# systemctl enable docker --now
    2. Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.

    5、测试

    1. [root@bogon ~]# docker run hello-world
    2. Unable to find image 'hello-world:latest' locally
    3. latest: Pulling from library/hello-world
    4. c1ec31eb5944: Pull complete
    5. Digest: sha256:53641cd209a4fecfc68e21a99871ce8c6920b2e7502df0a20671c6fccc73a7c6
    6. Status: Downloaded newer image for hello-world:latest
    7. Hello from Docker! ## 出现这行,说明部署成功
    8. This message shows that your installation appears to be working correctly.
    9. To generate this message, Docker took the following steps:
    10. 1. The Docker client contacted the Docker daemon.
    11. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    12. (amd64)
    13. 3. The Docker daemon created a new container from that image which runs the
    14. executable that produces the output you are currently reading.
    15. 4. The Docker daemon streamed that output to the Docker client, which sent it
    16. to your terminal.
    17. To try something more ambitious, you can run an Ubuntu container with:
    18. $ docker run -it ubuntu bash
    19. Share images, automate workflows, and more with a free Docker ID:
    20. https://hub.docker.com/
    21. For more examples and ideas, visit:
    22. https://docs.docker.com/get-started/

  • 相关阅读:
    产业互联网时代,并不存在传统意义上的互联网
    结合实战,浅析GB/T28181(三)——实况点播
    everything项目测试篇
    Matlab:Matlab 软件学习之Matlab内置的各种系统的简介、案例应用(基于Simulink模糊控制仿真/二阶瞬态震荡电路案例)之详细攻略
    威纶通触摸屏制作自定义弹出窗口的具体方法(3种)
    算法 数据结构 斐波那契数列 递归实现斐波那契数列 斐波那契递归的优化 斐波那契数列递归求解 多路递归实现 斐波那契算法系列 数据结构(十一)
    CSDN页面左上角出现红色“不安全 | https” ,并且把鼠标放在上面的头像和消息时无法下拉菜单
    C++中如何处理超长的数字(long long类型的整数都无法存储的)
    Compute通过Conductor访问数据库方法
    java web:springboot mysql开发的一套家政预约上门服务系统源码:家政上门服务系统的运行流程
  • 原文地址:https://blog.csdn.net/m0_53733914/article/details/138587330
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号