镜像下载、域名解析、时间同步请点击阿里云开源镜像站
在VMware上搭建docker的时候报了Failed to start docker.service: Unit not found。查看了好多
博主的分享,但因为图片有限,不确定问题是不是一样。当我找到这个博客作者时,我的眼睛像一角硬币一样亮了起来。而这位博主也非常仔细地上传了他的照片,我根据他的分享成功地组装了它。再次感谢您。如果你感兴趣,你可以看看博主的文章,这篇文章非常详细。
[En]
The sharing of the blogger, but because the picture is limited, I am not sure whether the problem is the same. When I found this blogger, my eyes lit up like a dime. And the blogger also posted his picture very carefully, and I assembled it successfully according to his sharing. Thanks again. If you are interested, you can take a look at the blogger’s article, which is really detailed.
新建centos7的虚拟机安装docker后无法启动,报错:Failed to start docker.service: Unit not found
我这针对docker的设置存储库 进行一点改动,这里说明一下,因为么有当时的图片了,就用博主的说明一下就可以。
这是官网的顺序,无可厚非,但可以了解国内外网络的下载速度。
[En]
This is the order of the official website, there is nothing wrong with it, but you can understand the download speed of domestic and foreign networks.
所以国内的阿里提供了一个开源的包来下载这个片段,一切都一样。
[En]
So the domestic Ali provides an open source package for downloading this piece, and everything is the same.
yum install -y yum-utils
yum-config-manager \
--add-repo \
http://mirros.aliyun.com/docker-ce/linux/centos/docker-ce.repo
出现标红的这一块 就说明下载成功了,紧接着下一步。
官网,这我没有按照最新的去执行,因为根据经验 最新的未必是OK的。
所以, 这是我执行的命令。事实也确实可用。
yum install docker-ce docker-ce-cli containerd.io
执行完后会出现两个选择。这里我们都输入y,回车就行。
启动docker
systemctl start docker
正常情况下 没有异常出现就是最好的出现。输入命令查看docker版本情况。
ps -ef|grep docker
输入命令 查看客户端和service端 版本是否一致。其实到这一步 就代表你的docker已经安装好了。
输入万能测试命令 hello word
docker run hello-world
到此,你的docker已经可以运行,开启你的学习进程吧。
本文转自:https://blog.csdn.net/weixin_48584982/article/details/124540002
Original: https://www.cnblogs.com/helong-123/p/16313515.html
Author: 萌褚
Title: Failed to start docker.service: Unit not found
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/523497/
转载文章受原作者版权保护。转载请注明原作者出处!