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 信息

    在这里插入图片描述

相关文章

Docker是什么Docker是 Docker.Inc 公司开源的一个基于 LXC技...
本文为原创,原始地址为:http://www.cnblogs.com/fengzheng...
镜像操作列出镜像:$ sudo docker imagesREPOSITORY TAG IMA...
本文原创,原文地址为:http://www.cnblogs.com/fengzheng/p...
在 Docker 中,如果你修改了一个容器的内容并希望将这些更改...
在Docker中,--privileged 参数给予容器内的进程几乎相同的权...