博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
centos7 安装docker
阅读量:3951 次
发布时间:2019-05-24

本文共 983 字,大约阅读时间需要 3 分钟。

centos7 安装docker

一、前言

本篇博客其实是将docker官网的安装步骤办了过来。其中只涉及到了基本的安装方式和选项,如果想要看更多的docker安装的细节,可以看docker的文档官网。

环境介绍

一个纯净的centos7环境
在这里插入图片描述

二、步骤

为了方便我接下来安装docker的步骤会在shell连接工具中执行。

1. Uninstall Docker Engine(卸载原本存在的docker依赖)

$ sudo yum remove docker \                  docker-client \                  docker-client-latest \                  docker-common \                  docker-latest \                  docker-latest-logrotate \                  docker-logrotate \                  docker-engine

2.Install using the repository

$ sudo yum install -y yum-utils$ sudo yum-config-manager \    --add-repo \    https://download.docker.com/linux/centos/docker-ce.repo

3.INSTALL DOCKER ENGINE

$ sudo yum install docker-ce docker-ce-cli containerd.io

4.Start Docker

$ sudo systemctl start docker

5.Verify that Docker Engine is installed correctly by running the hello-world image.

$ sudo docker run hello-world

运行结果

如果能看到下面情形说明docker安装成功。
在这里插入图片描述

三、尾声

其实一般情况下安装步骤到第三步时就算安装成功了。第四步是用于启动docker服务,第五步是安装一个docker实例进行测试。

转载地址:http://kxgwi.baihongyu.com/

你可能感兴趣的文章
Mac OS 版本历史
查看>>
C语言预处理指令笔记 by STP
查看>>
C语言数据类型笔记 by STP
查看>>
C语言指针笔记 by STP
查看>>
C语言(结构体、枚举、typedef)笔记 by STP
查看>>
Objective-C 零散知识笔记 by STP
查看>>
Category和Protocol笔记 by STP
查看>>
CoreLocation笔记 by STP
查看>>
iOS运行原理笔记 by STP
查看>>
UIViewController的生命周期笔记 by STP
查看>>
版本控制工具笔记-Git by STP
查看>>
Application Transport Security has blocked a cleartext HTTP (http://) 解决方案
查看>>
The identity used to sign the executable is no longer valid.解决方案
查看>>
Xcode增加pch文件
查看>>
CocoaPods安装和使用笔记 by STP
查看>>
Could not find developer disk image-解决方案
查看>>
升级Xcode之后VVDocumenter-Xcode不能用的解决办法
查看>>
iOS开发常见报错及解决方案 by STP
查看>>
SVN(Cornerstone)屏蔽/忽略不需要版本控制的UserInterfaceState.xcuserstate
查看>>
IOS 8 以上版本 设置applicationIconBadgeNumber和消息推送
查看>>