参考,https://www.cnblogs.com/JiangLe/p/6921320.html
如果建了docker.repo,还是找不到yum源,重新建一个docker-ce.repo
内容为:
[docker-ce-stable]
name=Docker CE Stable -
b
a
s
e
a
r
c
h
b
a
s
e
u
r
l
=
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
a
l
i
y
u
n
.
c
o
m
/
d
o
c
k
e
r
−
c
e
/
l
i
n
u
x
/
c
e
n
t
o
s
/
7
/
basearch baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/
basearchbaseurl=https://mirrors.aliyun.com/docker−ce/linux/centos/7/basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
[docker-ce-stable-debuginfo]
name=Docker CE Stable - Debuginfo
b
a
s
e
a
r
c
h
b
a
s
e
u
r
l
=
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
a
l
i
y
u
n
.
c
o
m
/
d
o
c
k
e
r
−
c
e
/
l
i
n
u
x
/
c
e
n
t
o
s
/
7
/
d
e
b
u
g
−
basearch baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/debug-
basearchbaseurl=https://mirrors.aliyun.com/docker−ce/linux/centos/7/debug−basearch/stable
enabled=0
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
[docker-ce-stable-source]
name=Docker CE Stable - Sources
baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/source/stable
enabled=0
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
[docker-ce-edge]
name=Docker CE Edge -
b
a
s
e
a
r
c
h
b
a
s
e
u
r
l
=
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
a
l
i
y
u
n
.
c
o
m
/
d
o
c
k
e
r
−
c
e
/
l
i
n
u
x
/
c
e
n
t
o
s
/
7
/
basearch baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/
basearchbaseurl=https://mirrors.aliyun.com/docker−ce/linux/centos/7/basearch/edge
enabled=0
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
[docker-ce-edge-debuginfo]
name=Docker CE Edge - Debuginfo
b
a
s
e
a
r
c
h
b
a
s
e
u
r
l
=
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
a
l
i
y
u
n
.
c
o
m
/
d
o
c
k
e
r
−
c
e
/
l
i
n
u
x
/
c
e
n
t
o
s
/
7
/
d
e
b
u
g
−
basearch baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/debug-
basearchbaseurl=https://mirrors.aliyun.com/docker−ce/linux/centos/7/debug−basearch/edge
enabled=0
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
[docker-ce-edge-source]
name=Docker CE Edge - Sources
baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/source/edge
enabled=0
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
[docker-ce-test]
name=Docker CE Test -
b
a
s
e
a
r
c
h
b
a
s
e
u
r
l
=
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
a
l
i
y
u
n
.
c
o
m
/
d
o
c
k
e
r
−
c
e
/
l
i
n
u
x
/
c
e
n
t
o
s
/
7
/
basearch baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/
basearchbaseurl=https://mirrors.aliyun.com/docker−ce/linux/centos/7/basearch/test
enabled=0
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
[docker-ce-test-debuginfo]
name=Docker CE Test - Debuginfo
b
a
s
e
a
r
c
h
b
a
s
e
u
r
l
=
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
a
l
i
y
u
n
.
c
o
m
/
d
o
c
k
e
r
−
c
e
/
l
i
n
u
x
/
c
e
n
t
o
s
/
7
/
d
e
b
u
g
−
basearch baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/debug-
basearchbaseurl=https://mirrors.aliyun.com/docker−ce/linux/centos/7/debug−basearch/test
enabled=0
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
[docker-ce-test-source]
name=Docker CE Test - Sources
baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/source/test
enabled=0
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
[docker-ce-nightly]
name=Docker CE Nightly -
b
a
s
e
a
r
c
h
b
a
s
e
u
r
l
=
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
a
l
i
y
u
n
.
c
o
m
/
d
o
c
k
e
r
−
c
e
/
l
i
n
u
x
/
c
e
n
t
o
s
/
7
/
basearch baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/
basearchbaseurl=https://mirrors.aliyun.com/docker−ce/linux/centos/7/basearch/nightly
enabled=0
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
[docker-ce-nightly-debuginfo]
name=Docker CE Nightly - Debuginfo
b
a
s
e
a
r
c
h
b
a
s
e
u
r
l
=
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
a
l
i
y
u
n
.
c
o
m
/
d
o
c
k
e
r
−
c
e
/
l
i
n
u
x
/
c
e
n
t
o
s
/
7
/
d
e
b
u
g
−
basearch baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/debug-
basearchbaseurl=https://mirrors.aliyun.com/docker−ce/linux/centos/7/debug−basearch/nightly
enabled=0
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
[docker-ce-nightly-source]
name=Docker CE Nightly - Sources
baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/source/nightly
enabled=0
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg