Linux Docker的部署

1.安装

$ yum -y install docker

2.启动docker服务

$ systemctl start docker

3.设置开启自启

$ systemctl enable docker

4.查看版本信息

$ docker version
Client:
 Version:         1.13.1
 API version:     1.26
 Package version: docker-1.13.1-94.gitb2f74b2.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      b2f74b2/1.13.1
 Built:           Tue Mar 12 10:27:24 2019
 OS/Arch:         linux/amd64

Server:
 Version:         1.13.1
 API version:     1.26 (minimum version 1.12)
 Package version: docker-1.13.1-94.gitb2f74b2.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      b2f74b2/1.13.1
 Built:           Tue Mar 12 10:27:24 2019
 OS/Arch:         linux/amd64
 Experimental:    false

5.显示 Docker 系统信息,包括镜像和容器数。

$ docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 1.13.1
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: false
……

6.从Docker Hub中搜索合适的镜像(以centos为例)

$ docker search centos

Linux Docker的部署_第1张图片

 7.下载镜像(从公网docker hub拉取(下载)image)

$ docker pull docker.io/centos

8.查看本地镜像

$ docker images

 

转载于:https://www.cnblogs.com/LMIx/p/10757232.html

你可能感兴趣的:(运维,git)