docs: update docker/install
This commit is contained in:
parent
029d36e754
commit
d3c61fdb9e
@ -2,7 +2,7 @@
|
||||
title: docker的安装
|
||||
description: docker的安装
|
||||
published: true
|
||||
date: 2021-08-02T08:28:31.729Z
|
||||
date: 2021-09-02T06:20:04.827Z
|
||||
tags: docker
|
||||
editor: markdown
|
||||
dateCreated: 2021-08-02T07:22:52.894Z
|
||||
@ -32,27 +32,35 @@ $ sudo yum remove docker \
|
||||
docker-logrotate \
|
||||
docker-engine
|
||||
```
|
||||
或者查看已经安装的docker
|
||||
```bash
|
||||
$ yum list installed |grep docker
|
||||
```
|
||||
|
||||
##### 安装
|
||||
[官方安装传送门](https://docs.docker.com/engine/install/centos/)
|
||||
###### 下载依赖
|
||||
|
||||
###### 所需软件包
|
||||
[选择对应CentOS版本](https://download.docker.com/linux/centos/)
|
||||
|
||||
下载stable版本的两个文件,这里是CentOS7.5
|
||||
- docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
|
||||
- docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
|
||||
|
||||
###### 执行安装
|
||||
```bash
|
||||
$ sudo yum install -y yum-utils device-mapper-persistent-data lvm2
|
||||
$ yum install -y docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
|
||||
|
||||
$ yum install -y docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
|
||||
```
|
||||
|
||||
###### 设置仓库
|
||||
|
||||
阿里云
|
||||
|
||||
#### 启动docker
|
||||
设置开机启动
|
||||
```bash
|
||||
$ sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
|
||||
$ systemctl enable docker
|
||||
```
|
||||
|
||||
###### 安装 Docker Engine-Community
|
||||
|
||||
启动
|
||||
```bash
|
||||
$ yum install docker-ce docker-ce-cli containerd.io
|
||||
$ systemctl start docker
|
||||
```
|
||||
|
||||
#### 删除
|
||||
|
Loading…
Reference in New Issue
Block a user