docker使用问题
在deepin linux操作系统中安装docker-engine后启动失败。
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
错误1:
使用docker ps命令报错:Cannot connect to the Docker daemon. Is the docker daemon running on this host?
使用sudo dockerd报错
WARN[0000] devmapper: Base device already exists and has filesystem xfs on it. User specified filesystem will be ignored.
INFO[0000] [graphdriver] using prior storage driver "devicemapper"
FATA[0001] Error starting daemon: timeout
ps查看进程dockerd已启动
重复使用systemctl stop/start docker 问题依然
systemctl stop docker 后,使用sudo dockerd启动无异常报错,怀疑是docker命令找不到sock,sock文件/var/run/docker.sock 权限是srw-rw----
当前用户没有权限访问,默认情况下,docker会监听 unix:///var/run/docker.sock,只允许本地的root用户连接
解决办法:
1. 将当前用户添加到docker启动组内,执行 usermod -aG docker $USER ,但root启动无效
2. root启动,有sudo权限那就 使用 sudo docker ps即可
3. 修改docker启动配置,使用TCP监听 修改/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd -H fd:// 修改为 /usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375
重启docker
导入变量export DOCKER_HOST=tcp://localhost:2375
错误2:
docker run -d
docker: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"process_linux.go:359: container init caused \\\"rootfs_linux.go:53: mounting \\\\\\\"cgroup\\\\\\\" to rootfs \\\\\\\"/var/lib/docker/devicemapper/mnt/dee9d3d23be58840c31b001018f5243c62686a23a28afc009e6029747ef0a955/rootfs\\\\\\\" at \\\\\\\"/sys/fs/cgroup\\\\\\\" caused \\\\\\\"no subsystem for mount\\\\\\\"\\\"\"\n".
解决:
opencontainers/runc#1175 mentions such solution:
Change GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub so that it looks like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet systemd.legacy_systemd_cgroup_controller=yes"
quiet is from default Debian grub install.
Then update grub and reboot:
sudo update-grub
sudo reboot
docker使用问题的更多相关文章
- docker——容器安装tomcat
写在前面: 继续docker的学习,学习了docker的基本常用命令之后,我在docker上安装jdk,tomcat两个基本的java web工具,这里对操作流程记录一下. 软件准备: 1.jdk-7 ...
- Docker笔记一:基于Docker容器构建并运行 nginx + php + mysql ( mariadb ) 服务环境
首先为什么要自己编写Dockerfile来构建 nginx.php.mariadb这三个镜像呢?一是希望更深入了解Dockerfile的使用,也就能初步了解docker镜像是如何被构建的:二是希望将来 ...
- Docker 第一篇--初识docker
已经多年不写博客, 看完<晓松奇谈>最后一期猛然觉醒, 决定仔细梳理下自己这几年的知识脉络. 既然决定写, 那么首先就从最近2年热门的开源项目Docker开始.Docker 这两年在国内很 ...
- 在docker中运行ASP.NET Core Web API应用程序(附AWS Windows Server 2016 widt Container实战案例)
环境准备 1.亚马逊EC2 Windows Server 2016 with Container 2.Visual Studio 2015 Enterprise(Profresianal要装Updat ...
- docker for mac 学习记录
docker基本命令 docker run -d -p 80:80 --name webserver nginx 运行容器并起别名 docker ps 展示目前启动的容器 docker ps -a 展 ...
- scrapy爬虫docker部署
spider_docker 接我上篇博客,为爬虫引用创建container,包括的模块:scrapy, mongo, celery, rabbitmq,连接https://github.com/Liu ...
- [原][Docker]特性与原理解析
Docker特性与原理解析 文章假设你已经熟悉了Docker的基本命令和基本知识 首先看看Docker提供了哪些特性: 交互式Shell:Docker可以分配一个虚拟终端并关联到任何容器的标准输入上, ...
- 开发者的利器:Docker 理解与使用
困扰写代码的机器难免会被我们安装上各种各样的开发工具.语言运行环境和引用库等一大堆的东西,长久以来不仅机器乱七八糟,而且有些相同的软件还有可能会安装不同的版本,这样又会导致一个项目正常运行了,却不小心 ...
- 使用python自动生成docker nginx反向代理配置
由于在测试环境上用docker部署了多个应用,而且他们的端口有的相同,有的又不相同,数量也比较多,在使用jenkins发版本的时候,不好配置,于是想要写一个脚本,能在docker 容器创建.停止的时候 ...
- 微服务与Docker介绍
什么是微服务 微服务应用的一个最大的优点是,它们往往比传统的应用程序更有效地利用计算资源.这是因为它们通过扩展组件来处理功能瓶颈问题.这样一来,开发人员只需要为额外的组件部署计算资源,而不需要部署一个 ...
随机推荐
- perf stat 输出解读
http://zhengheng.me/2015/11/12/perf-stat/ http://zhengheng.me/2015/08/30/perf-tools/
- BUPT复试专题—进程管理(2014网研)
题目描述 在操作系统中,进程管理是非常重要的工作.每个进程都有唯一的进程标识PID.每个进程都可以启动子进程,此时我们称该它本身是其子进程的父进程.除PID为0的进程之外,每个进程冇且只冇一个父进程. ...
- PAT 1003 Sharing (25)
题目描写叙述 To store English words, one method is to use linked lists and store a word letter by letter. ...
- Type cannot use 'try' with exceptions disabled
cannot use ‘throw’ with exceptions disabled 在为 DragonBonesCPP/refactoring 的 cocos2d-x-3.2 demo 增加 An ...
- Redis经常使用命令
1 创建-是否存储-查看-删除 set name maojun;exists name;get name;del name; 2 序列化记录 set name maojun;exists name;d ...
- App反编译二次打包常见问题处理
1.二次打包时报错:Error retrieving parent for item: No resource found that matches the given name 如: D:\用户文件 ...
- jsp学习笔记总结
Cookie中对保存对象的大小是有限制的 解决cookie中无法保存中文的问题: request.setCharacterEncoding URLEncoder.encode()编码 URLDecod ...
- python 爬虫1 開始,先拿新浪微博開始
刚刚開始学. 目的地是两个.一个微博,一个贴吧 存入的话,临时还没想那么多.先存到本地目录吧 分词和推荐后面在整合 mysql mongodb hadoop redius 后面在用 我最终知道为什么大 ...
- HDU 6078 Wavel Sequence 树状数组优化DP
Wavel Sequence Problem Description Have you ever seen the wave? It's a wonderful view of nature. Lit ...
- Codeforces Round #422 (Div. 2) E. Liar 后缀数组+RMQ+DP
E. Liar The first semester ended. You know, after the end of the first semester the holidays beg ...