码农知识堂 - 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/

  • 相关阅读:
    Rust图形界面编程:egui平直布局
    GBase 8c 远程数据库连接
    iris(golang)连接mysql数据库
    4、vue路由
    给用户随机推荐不是自己发布的笔记,报错了。
    排序算法的稳定性
    《Solidity 简易速速上手小册》第7章:智能合约的部署与交互(2024 最新版)
    LeetCode 斐波那契序列
    cmake详细教程(三)
    网络综合和简化实频理论学习概述
  • 原文地址:https://blog.csdn.net/m0_53733914/article/details/138587330
  • 最新文章
  • 沪漂五周年了:我越来越迷茫了
    Agentic Skill Routing 实战:别再把所有 Skill 塞进 AI Agent 上下文
    MySQL-Seconds_behind_master的精度误差
    [MAF预定义ChatClient中间件-03]CachingChatClient——利用缓存省钱省时间
    AI的至暗历史:从万众期待到被政府撤资,AI的两次死亡徘徊
    Agent OS :五种驯服不确定性的范式
    PortSwigger SQL注入LAB11
    数据库即时编译JIT
    [Begin]AI Learn Data Day 0
    深度学习进阶(二十七)现代 LLM 的核心架构设计其二:SwiGLU
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
小工具 小游戏
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1

京公网安备 11010502049817号