在centos7.3上yum安装了docker V1.13。1
但是在运行:docker run hello-world的时候报错:
# docker run docker.io/hello-world container_linux.go:247: starting container process caused "process_linux.go:258: applying cgroup configuration for process caused \\"Cannot set property TasksAccounting, or unknown property.\\"" /usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:258: applying cgroup configuration for process caused \\"Cannot set property TasksAccounting, or unknown property.\\"".
解决:
主要原因还是centos系统版本兼容性问题,如果将系统做更新升级,即可解决。
yum update
更新前:
更新后:
此时重启docker,运行hello-world:
补充知识:删除none镜像
删除none镜像
|
1
2
3
4
5
6
7
8
9
10
11 |
// 停止所有容器
docker ps -a | grep "Exited" | awk '{print $1 }'|xargs docker stop
// 删除所有停止的容器
docker ps -a | grep "Exited" | awk '{print $1 }'|xargs docker rm
// 删除所有tag标签是none的镜像
docker images|grep none|awk '{print $3 }'|xargs docker rmi
可以编辑 ~/.zshrc (或~/.bashrc) 指定指令别名
alias dnone="docker images|grep none|awk '{print $3}'|xargs docker rmi"
source ~/.zshrc
####################官方删除命令############### |
none镜像产生的原因是:
怎么来的
结合第一幅图,梳理一下dangling images怎么产生的:
第一次构建镜像时生成的镜像ID为079dbd67f9f4,此镜像会被构建工具加上标签bolingcavalry/eureka-server:0.0.1-SNAPSHOT;
第二次构建镜像时生成的镜像ID为e40a97f764ef,此镜像会被构建工具加上标签bolingcavalry/eureka-server:0.0.1-SNAPSHOT,
Docker会移除079dbd67f9f4的标签,此时079dbd67f9f4就变成了dangling images,在镜像列表中展示为<none>:<none>
官方提供如下命令来删除,注意:如果该none镜像被使用,将不会被删除:
docker image prune
以上这篇解决docker安装后运行hello-world报错的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持快网idc。
原文链接:https://www.cnblogs.com/wang–lei/p/10626308.html
相关文章
- 服务器虚拟化技术深度科普 2025-05-27
- 服务器租用价格怎么计算?服务器租用多少钱一年? 2025-05-27
- 云服务器的“弹性”体现在哪些方面? 2025-05-27
- 刀片服务器是什么 刀片服务器的主要特点 2025-05-27
- 利用FTP和计划任务自动备份网站数据和数据库 2025-05-27
- 2025-07-10 怎样使用阿里云的安全工具进行服务器漏洞扫描和修复?
- 2025-07-10 怎样使用命令行工具优化Linux云服务器的Ping性能?
- 2025-07-10 怎样使用Xshell连接华为云服务器,实现高效远程管理?
- 2025-07-10 怎样利用云服务器D盘搭建稳定、高效的网站托管环境?
- 2025-07-10 怎样使用阿里云的安全组功能来增强服务器防火墙的安全性?
快网idc优惠网
QQ交流群
-
2025-05-27 50
-
2025-05-26 48
-
2025-05-27 83
-
2025-05-26 42
-
2025-05-27 56





