• centos7安装 docker

切换到 root用户,执行:

[root@localhost frinder]# yum install docker
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
正在解决依赖关系
--> 正在检查事务
--> 解决依赖关系完成

依赖关系解决

=================================================================================================================================================================
Package 架构 版本 源 大小
=================================================================================================================================================================
正在安装:
docker x86_64 2:1.12.6-11.el7.centos extras 20 M
为依赖而安装:
container-selinux noarch 2:2.9-4.el7 extras 26 k
docker-client x86_64 2:1.12.6-11.el7.centos extras 4.4 M
docker-common x86_64 2:1.12.6-11.el7.centos extras 71 k
oci-register-machine x86_64 1:0-1.11.gitdd0daef.el7 extras 1.1 M
oci-systemd-hook x86_64 1:0.1.4-9.git671c428.el7 extras 29 k
skopeo-containers x86_64 1:0.1.18-1.el7 extras 7.6 k

事务概要
=================================================================================================================================================================
安装 1 软件包 (+6 依赖软件包)

总下载量:26 M
安装大小:104 M
Is this ok [y/d/N]: y
Downloading packages:
警告:/var/cache/yum/x86_64/7/extras/packages/container-selinux-2.9-4.el7.noarch.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
container-selinux-2.9-4.el7.noarch.rpm 的公钥尚未安装
(1/7): container-selinux-2.9-4.el7.noarch.rpm | 26 kB 00:00:00
(2/7): docker-client-1.12.6-11.el7.centos.x86_64.rpm | 4.4 MB 00:00:04
(3/7): docker-common-1.12.6-11.el7.centos.x86_64.rpm | 71 kB 00:00:00
(4/7): oci-register-machine-0-1.11.gitdd0daef.el7.x86_64.rpm | 1.1 MB 00:00:01
(5/7): oci-systemd-hook-0.1.4-9.git671c428.el7.x86_64.rpm | 29 kB 00:00:00
(6/7): skopeo-containers-0.1.18-1.el7.x86_64.rpm | 7.6 kB 00:00:00
(7/7): docker-1.12.6-11.el7.centos.x86_64.rpm | 20 MB 00:00:13
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
总计 1.9 MB/s | 26 MB 00:00:13
从 http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 检索密钥
导入 GPG key 0xF4A80EB5:
用户ID : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
指纹 : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
来自 : http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
是否继续?[y/N]:y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : 2:docker-common-1.12.6-11.el7.centos.x86_64 1/7
正在安装 : 2:docker-client-1.12.6-11.el7.centos.x86_64 2/7
正在安装 : 1:oci-systemd-hook-0.1.4-9.git671c428.el7.x86_64 3/7
正在安装 : 1:oci-register-machine-0-1.11.gitdd0daef.el7.x86_64 4/7
正在安装 : 1:skopeo-containers-0.1.18-1.el7.x86_64 5/7
正在安装 : 2:container-selinux-2.9-4.el7.noarch 6/7
正在安装 : 2:docker-1.12.6-11.el7.centos.x86_64 7/7
验证中 : 2:container-selinux-2.9-4.el7.noarch 1/7
验证中 : 2:docker-1.12.6-11.el7.centos.x86_64 2/7
验证中 : 1:skopeo-containers-0.1.18-1.el7.x86_64 3/7
验证中 : 1:oci-register-machine-0-1.11.gitdd0daef.el7.x86_64 4/7
验证中 : 2:docker-common-1.12.6-11.el7.centos.x86_64 5/7
验证中 : 2:docker-client-1.12.6-11.el7.centos.x86_64 6/7
验证中 : 1:oci-systemd-hook-0.1.4-9.git671c428.el7.x86_64 7/7

已安装:
docker.x86_64 2:1.12.6-11.el7.centos

作为依赖被安装:
container-selinux.noarch 2:2.9-4.el7 docker-client.x86_64 2:1.12.6-11.el7.centos docker-common.x86_64 2:1.12.6-11.el7.centos
oci-register-machine.x86_64 1:0-1.11.gitdd0daef.el7 oci-systemd-hook.x86_64 1:0.1.4-9.git671c428.el7 skopeo-containers.x86_64 1:0.1.18-1.el7

完毕!

启动 docker,执行:
[root@localhost frinder]# systemctl start docker.service

将 docker设置开机启动:
[root@localhost frinder]# systemctl enable docker.service
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.

下载 docker使用 Centos镜像,下载有点慢,耐心等待:
[root@localhost docker]# docker pull centos
Using default tag: latest
Trying to pull repository docker.io/library/centos ...
latest: Pulling from docker.io/library/centos
93857f76ae30: Pull complete
Digest: sha256:4eda692c08e0a065ae91d74e82fff4af3da307b4341ad61fa61771cc4659af60

查看下载镜像:
[root@localhost docker]# docker images centos
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/centos latest a8493f5f50ff 3 days ago 192.5 MB

使用 docker启动一个容器,启动成功会自动切换到临时容器 54d23ded3cd1:
[root@localhost docker]# docker run -i -t docker.io/centos /bin/bash
[root@54d23ded3cd1 /]#

[root@54d23ded3cd1 /]# ls /etc
BUILDTIME chkconfig.d gnupg issue.net modules-load.d popt.d rc5.d shells virc
DIR_COLORS crypttab group krb5.conf motd prelink.conf.d rc6.d skel xdg
DIR_COLORS.256color csh.cshrc group- krb5.conf.d mtab printcap redhat-release ssl xinetd.d
DIR_COLORS.lightbgcolor csh.login gshadow ld.so.cache nsswitch.conf profile resolv.conf subgid yum
GREP_COLORS dbus-1 gshadow- ld.so.conf nsswitch.conf.bak profile.d rpc subuid yum.conf
X11 default gss ld.so.conf.d openldap protocols rpm sysconfig yum.repos.d
adjtime.rpmsave depmod.d host.conf libaudit.conf opt python rsyslog.d sysctl.d
aliases dracut.conf hostname libuser.conf os-release rc.d sasl2 system-release
alternatives dracut.conf.d hosts locale.conf pam.d rc.local securetty system-release-cpe
bash_completion.d environment hosts.allow localtime passwd rc0.d security systemd
bashrc exports hosts.deny login.defs passwd- rc1.d selinux terminfo
binfmt.d filesystems init.d logrotate.d pkcs11 rc2.d services tmpfiles.d
centos-release fstab inputrc machine-id pki rc3.d shadow udev
centos-release-upstream gcrypt issue modprobe.d pm rc4.d shadow- vconsole.conf
[root@54d23ded3cd1 /]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[root@54d23ded3cd1 /]# exit

centos7安装 docker的更多相关文章

  1. Centos7安装Docker 基于Dockerfile 搭建httpd运行环境

    Centos7安装Docker 基于Dockerfile 搭建httpd运行环境 docker docker搭建 docker build 本文档完成目标内容如下 使用Docker搭建http服务器一 ...

  2. 【运维技术】VM虚拟机上使用centos7安装docker启动gogs服务教程【含B站视频教程】

    VM虚拟机上使用centos7安装docker启动gogs服务视频教程 BiliBili视频教程链接飞机票,点我 使用VMware Workstation安装Centos7 MinMal系统 第一步: ...

  3. centos install docker setup centos7 安装docker

    centos7 安装docker 1: 安装必要的一些系统工具sudo yum install -y yum-utils device-mapper-persistent-data lvm2 2: 添 ...

  4. 获取Centos7安装Docker各种姿势(指定版本)(转载)

    Centos7安装docker社区(CE)版 官网指导:https://docs.docker.com/engine/installation/linux/docker-ce/centos/#inst ...

  5. CentOS7安装docker 18.06

    原文:CentOS7安装docker 18.06 一.CentOS Docker 安装 参考docker 官方网站:https://docs.docker.com/install/linux/dock ...

  6. centos7 安装docker(手动和脚本安装)换源 卸载

    centos7 安装docker(手动和脚本安装)换源 卸载 Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的CentOS 版本是否支持 Docker ...

  7. Docker学习笔记(1):CentOS7安装Docker

    Docker是一个基于Go语言实现的开源应用容器引擎,通过对应用组件的封装.分发.部署.运行等生命周期的管理,使程序及其运行环境能够做到"一次封装,到处运行". Docker架构 ...

  8. 【Docker】 CentOS7 安装 Docker 及其使用方法 ( 一 )

    系列目录: [Docker] CentOS7 安装 Docker 及其使用方法 ( 一 ) [Docker] 使用Docker 在阿里云 Centos7 部署 MySQL 和 Redis (二) [D ...

  9. centos7安装docker、docker-compose、es7.3.0、kibana7.3.0

    一.安装docker 1.更新yum包 sudo yum update 2.卸载旧版本(如果安装过旧版本的话) sudo yum remove docker docker-common docker- ...

随机推荐

  1. Haskell语言学习笔记(21)Array

    Ix 数组下标类型 Prelude> :m +Data.Array Prelude Data.Array> data Colour = Red | Orange | Yellow | Gr ...

  2. spark cache table

    http://www.07net01.com/2015/11/961118.html http://www.cnblogs.com/charlotte77/p/5468968.html 文本读入和写出 ...

  3. 根据条件决定My97DatePicker日期控件弹出的日期格式

    代码如下: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <tit ...

  4. redis安装和命令使用

    前言: redis是一个key-value的存储系统,value支持string.list.set.zset.hash五种类型,且支持数据的本地存储   一.安装redis 前提:linux下需要安装 ...

  5. linux系统分区表修复

    有些时候在系统突然断电或硬盘只读后在看机会出现报错,开机到不了登录界面,而是来到一个提示: Give root password for maintenance(or type Control-d t ...

  6. swift VFL - 父视图是scrollview 注意点

    1. scrollview 添加 子控件, 必须设置 宽度和高度, 他自己无法撑满2. scrollview的子空间的约束  只能相对于 左边 的顶部, 无法设置右边和底部的约束 3. 设置最小距离 ...

  7. 接触mybatis使用

    1.mybatis mybatis是一个自定义sql.存储过程和高级映射的持久层框架,是Apache下的顶级项目. mybatis可以让程序员将主要精力放在sql上,通过mybatis提供的映射方式. ...

  8. .Net多线程 并行编程(三)---并行集合

    为了让共享的数组,集合能够被多线程更新,我们现在(.net4.0之后)可以使用并发集合来实现这个功能. 而System.Collections和System.Collections.Generic命名 ...

  9. CentOS7下BIND配置主从服务器和缓存服务器

    系统环境:CentOS Linux release 7.4.1708 (Core)  3.10.0-693.el7.x86_64 软件版本:bind-chroot-9.9.4-51.el7_4.1.x ...

  10. code4906 删数问题

    题目: 键盘输入一个高精度的正整数n(<=240位), 去掉任意s个数字后剩下的数字按原左右次序将组成一个新的正整数. 编程对给定的n和s,寻找一种方案,使得剩下的数最小. Simple Inp ...