Linux CentOS6 安装 Docker

Linux CentOS Docker About 1,602 words

说明

旧版本Docker被称为dockerdocker.iodocker-engine

Docker最后一个支持CentOS 6的版本是1.7.1点击查看相关说明

添加 yum 源

tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF

安装 Dokcer

yum install docker-engine

启动 Docker

service docker start

查看 Docker 信息

docker info

输出:

Containers: 0
Images: 0
Storage Driver: devicemapper
 Pool Name: docker-253:0-131675-pool
 Pool Blocksize: 65.54 kB
 Backing Filesystem: extfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 305.7 MB
 Data Space Total: 107.4 GB
 Data Space Available: 17.03 GB
 Metadata Space Used: 729.1 kB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.147 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.117-RHEL6 (2016-12-13)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 2.6.32-754.el6.x86_64
Operating System: <unknown>
CPUs: 1
Total Memory: 979.5 MiB
Name: root.centos
ID: TXFJ:B5JZ:5CNA:JGQ7:3KPB:Q2BK:7TBH:7FTP:2X4H:SXQK:MAX6:P433

查看 Docker 版本信息

docker version

输出:

Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d
OS/Arch (server): linux/amd64

设置开机启动

chkconfig docker on
Views: 5,563 · Posted: 2019-09-06

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh