docker 常见错误总结
docker common error
Non-existing image of running container
drm() { docker rm $(docker ps -q -a); }
dri() { docker rmi $(docker images -q); }
ddri(){ docker rmi $(docker images -f 'dangling=true' -q); }
can NOT expost port , can not access container from outside
The problem lies in the fact that I ran the container like this:
docker run -p 3306:3306 asyncfi/magento-mysql
This publishes the container's port to all interfaces of the host machine, which is definitely not what I was looking for at this time. To bind only to localhost, it was necessary to run the container as follows:
docker run -p 127.0.0.1:3306:3306 asyncfi/magento-mysql
Also the EXPOSE line in Dockerfile is not necessary as the "expose" mechanism is used to link containers.
and in my case , I had to use the same port both outside and inside the container
docker run -p 127.0.0.1:PORT_A:PORT_B asyncfi/magento-mysql
PORT_A and PORT_B must be the same
runing on OSX:
dengwei@dengweis-MacBook-Pro:~/docker/node-web-app$ docker info
Containers: 2
Images: 59
Server Version: 1.9.0
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 64
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.1.12-boot2docker
Operating System: Boot2Docker 1.9.0 (TCL 6.4); master : 16e4a2a - Tue Nov 3 19:49:22 UTC 2015
CPUs: 1
Total Memory: 1.956 GiB
Name: default
ID: E2AI:WJN3:75JM:65TC:XKGI:GWGN:X22Y:4F6J:5RDS:MXEL:62VH:V6I4
Debug mode (server): true
File Descriptors: 53
Goroutines: 126
System Time: 2016-01-18T14:04:31.465301917Z
EventsListeners: 1
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
provider=virtualbox
Turn out I should use docker container ip , which is 192.168.99.100 as default, besides you need to make sure the container is running.

Dockerfile
error in RUN
RUN mkdir -p /var/git/finance
RUN cd /var/git/finance
this will show no such file or folder error
seems RUN in run in parrel, rather in paraller
so we need to change it into this:
RUN mkdir -p /var/git/finance \
&& cd /var/git/finance \
network connection issue
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a proxy.
bash-3.2$
//fix:
$ docker-machine restart default # Restart the environment
$ eval $(docker-machine env default) # Refresh your environment settings
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
Linux:
From Create a Docker group section it is neccesary add user to docker group:
sudo usermod -aG docker $(whoami)
Log out and log back in. This ensures your user is running with the correct permissions.
In Mac OSX:
As Dayel Ostraco says is necessary to add environments variables:
$ docker-machine start # start virtual machine for docker
$ docker-machine env # it's helps to get environment variables
$ eval "$(docker-machine env default)" #set environment variables
The docker-machine start outputs the comments to guide the process.
docker top command error: TERM environment variable not set.
echo "export TERM=dumb" >> ~/.bashrc
docker pull 经常碰到网络超时问题
```
request canceled (Client.Timeout exceeded while awaiting headers)
```
右键点击桌面顶栏的 docker 图标,选择 Preferences ,在 Daemon 标签(Docker 17.03 之前版本为 Advanced 标签)下的 Registry mirrors 列表中加入下面的镜像地址:
http://18fb5052.m.daocloud.io
点击 Apply & Restart 按钮使设置生效。
docker run out of disk causing can't start docker container
error log:
```
Docker Install: Error running DeviceCreate (createPool) dm_task_run failed
```
solve by remove all images and container:
```
# kill -9 $(lsof -t -c docker)
# rm -rf /var/lib/docker/*
# reboot
```
docker 常见错误总结的更多相关文章
- 分布式进阶(十一) Docker 常见错误汇总
NO.1 以上添加网桥的命令在Ubuntu14.04中是不可行的.正确的命令如下: brctl addbr br0 ifconfig br0 192.168.1.188 netmask 255.255 ...
- docker 运行时常见错误
docker 运行时常见错误 (1) Cannot connect to the Docker daemon at unix:///var/run/docker.sock. [root@localho ...
- Docker Hadoop 配置常见错误及解决办法
Docker Hadoop 配置常见错误及解决办法 问题1:wordcount运行卡住,hadoop 任务运行到running job就卡住了 INFO mapreduce.Job: Running ...
- 初识JAVA(二)(送给Java和安卓初学者)----常见错误
博主接着上篇的来讲哦,以后的更新中,博主会出一些练习题,有兴趣的可以做做然后吧代码粘贴到下面,大家可以一起研究学习,一起进步,本篇文章主要讲的是: 一.常见错误 二.连接上篇一起的训练 无论是什么方向 ...
- ubuntu 常见错误--Could not get lock /var/lib/dpkg/lock
ubuntu 常见错误--Could not get lock /var/lib/dpkg/lock 通过终端安装程序sudo apt-get install xxx时出错:E: Could not ...
- coreseek常见错误原因及解决方法
coreseek常见错误原因及解决方法 Coreseek 中文全文检索引擎 Coreseek 是一款中文全文检索/搜索软件,以GPLv2许可协议开源发布,基于Sphinx研发并独立发布,专攻中文搜索和 ...
- Android Fragment使用(二) 嵌套Fragments (Nested Fragments) 的使用及常见错误
嵌套Fragment的使用及常见错误 嵌套Fragments (Nested Fragments), 是在Fragment内部又添加Fragment. 使用时, 主要要依靠宿主Fragment的 ge ...
- C语言初学者代码中的常见错误与瑕疵(23)
见:C语言初学者代码中的常见错误与瑕疵(23)
- struts2.5框架使用通配符指定方法常见错误
struts2.5框架使用通配符指定方法(常见错误) 在学习struts框架时经常会使用到通配符调用方法,如下: <package name="shop" namespace ...
随机推荐
- 逐步构建循环神经网络 RNN
rnn.utils.py import numpy as np def softmax(x): e_x = np.exp(x - np.max(x)) return e_x / e_x.sum(axi ...
- org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'null' to required type 'double' for property 'band'; nested exception is org.springframework.core.convert.Con
本文为博主原创,未经允许不得转载: 先将异常粘贴出来: 20:37:26,909 ERROR [com.suning.fucdn.controller.ProductDataStaticsContro ...
- Codeforces Round #495 (Div. 2) D. Sonya and Matrix
http://codeforces.com/contest/1004/problem/D 题意: 在n×m的方格中,选定一个点(x,y)作为中心点,该点的值为0,其余点的值为点到中心点的曼哈顿距离. ...
- spark streaming将处理结果存入mysql中(使用c3p0连接池)
1.c3p0相应的架包导入工程中 将以下四个架包导入工程, 主要有三个架包:c3p0-0.9.5.2.jar c3p0-oracle-thin-extras-0.9.5.2.jar mchange-c ...
- Windows to go 慢,更换 user profile 路径
用 wintousb 安装了 windwos 10 到 u盘 之后, 发觉这个windows 贼慢,卡的不行. 想起以前台式机上用[太阳花]SDD,硬盘满了也是这个感觉的. 就知道 C盘的userpr ...
- iis7.0 win7如何修改默认iis端口号
iis7与iis6的设置方法要详细很多.所以,在更改设置上,iis7反而显得更复杂.iis作为本地网页编辑环境,占用80端口都是理所当然的.但是,作为网页调试的技术人员,通常本地都会安装iis.Apa ...
- 『TensorFlow』读书笔记_SoftMax分类器
开坑之前 今年3.4月份的时候就买了这本书,同时还买了另外一本更为浅显的书,当时读不懂这本,所以一度以为这本书很一般,前些日子看见知乎有人推荐它,也就拿出来翻翻看,发现写的的确蛮好,只是稍微深一点,当 ...
- Git:一个简单示例
初始状态:两个分支master/dev都只有一个文件readme.txt 待解决问题:在master分支新增文件,并且修改readme.txt文件,将上述操作同步至远程master分支,最后同步到de ...
- 64位win7连接ACCESS报错“Microsoft.Jet.OLEDB.4.0”问题
本人开发了桌面软件,关于事务提醒,自己一直在用,很喜欢,但是在64位win7上无法运行,网上说多种方法,都觉得麻烦.后来自己在vs2012下编译成x86版本,结果可以运行在64位win7下了. 原来如 ...
- c函数创建文件和路径
bool NewFileName(const char* filename) { size_t len; < (len = strlen(filename))) { char* tmpbuf, ...