微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Linux 安装docker--centOS 7 安装docker

1.环境准备
centOS 7 需要7.0版本或者更高版本
java环境

2.安装JDK
https://blog.csdn.net/baidu_33749894/article/details/123198723
3.安装docker

  1. 系统内核查看 uname -r ,内核版本高于3.0

    在这里插入图片描述

  2. 系统版本查看 cat /etc/os-release, 本教程centos7

    在这里插入图片描述

  3. 安装docker需要的前置包,先执行 ps -aux | grep all 杀死进程 kill -9 988, 然后在重新执行yum install -y yum-utils

    在这里插入图片描述

    在这里插入图片描述

  4. 配置镜像仓库
    yum-config-manager
    –add-repo
    https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

    在这里插入图片描述

  5. 更新yum 软件包索引 yum makecache fast

    在这里插入图片描述

  6. 安装docker相关的内容,yum install docker-ce docker-ce-cli containerd.io(社区版),yum install docker-ce docker-ee-cli containerd.io(企业版), 本次安装社区版,选择y,

    在这里插入图片描述


    在这里插入图片描述


    在这里插入图片描述

  7. 启动docker,到这我们就安装好了 systemctl start docker

    在这里插入图片描述

  8. holle world, docker run hello-world
    [root@localhost ~]# docker run hello-world
    Unable to find image ‘hello-world:latest’ locally #我们没有寻找到这个镜像
    latest: Pulling from library/hello-world #这个pull是不是就是去远程拉取镜像
    2db29710123e: Pull complete #拉取完成
    Digest: sha256:97a379f4f88575512824f3b352bc03cd75e239179eea0fecc38e597b2209f49a
    Status: Downloaded newer image for hello-world:latest
    Hello from Docker!
    This message shows that your installation appears to be working correctly.

    在这里插入图片描述

  9. 查看docker 信息

    在这里插入图片描述

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐