最近,公司内部短暂的项目空档期,了解了部分Docker的内容。主要是安装试用。我是在虚拟机中安装docker。本文高深理论没有,有的是枯燥的命令行和输出结果。
Installation on Redhat Enterprise Linux(RHEL) 6.5 x86_64
1. Install RHEL 6.5 x86_64
[Please refer to redhat offical doc.]
2. Install Docker
[Refers to http://docs.docker.com/installation/rhel/]
Docker is available for RHEL on EPEL. Please note that this package is part of Extra Packages for Enterprise Linux (EPEL), a community effort to create and maintain additional packages for the RHEL distribution.
Also note that due to the current Docker limitations, Docker is able to run only on the 64 bit architecture.
You will need RHEL 6.5 or higher, with a RHEL 6 kernel version 2.6.32-431 or higher as this has specific kernel fixes to allow Docker to work.
Installation
Firstly, you need to install the EPEL repository. Please follow the EPEL installation instructions.
(1) goto https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F
(2) select 'The newest version of 'epel-release' for EL6' and goto http://mirrors.yun-idc.com/epel/6/i386/repoview/epel-release.html
(3) download epel-release-6-8.noarch.rpm
(4) execute command on RHEL 6.4 terminal: rpm -ivh epel-release-6-8.noarch.rpm
The docker-io package provides Docker on EPEL.
If you already have the (unrelated) docker package installed, it will conflict with docker-io. There's a bug report filed for it. To proceed with docker-io installation, please remove docker first.
Next, let's install the docker-io package which will install Docker on our host.
$ sudo yum -y install docker-io
To update the docker-io package
$ sudo yum -y update docker-io
Now that it's installed, let's start the Docker daemon.
[bruce@rhel6 ~]$ sudo service docker start
Starting cgconfig service: [ OK ]
Starting docker: [ OK ]
[bruce@rhel6 ~]$ sudo docker info
Containers: 0
Images: 0
Storage Driver: devicemapper
Pool Name: docker-8:2-2625258-pool
Data file: /var/lib/docker/devicemapper/devicemapper/data
Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
Data Space Used: 291.5 Mb
Data Space Total: 102400.0 Mb
Metadata Space Used: 0.7 Mb
Metadata Space Total: 2048.0 Mb
Execution Driver: native-0.2
Kernel Version: 2.6.32-431.el6.x86_64
If we want Docker to start at boot, we should also:
$ sudo chkconfig docker on
To avoid uncertain issue on network access, I did turn off the iptables related service.
$ sudo service iptables statu
Docker Serials 1: 安装Docker 和 编译Base Image
最新推荐文章于 2024-04-11 09:31:54 发布
本文是Docker系列的第一篇,主要介绍如何在Red Hat系统上安装Docker,并详细讲解如何从零开始编译一个基础镜像,为后续的Docker实践打下基础。
摘要由CSDN通过智能技术生成