docker端口映射或启动容器时报错
原始镜像如下:
REPOSITORY TAG IMAGE ID CREATED SIZE
xtjatswc/mycore2 v3 73ce3cd97c01 About an hour ago .74GB
xtjatswc/mycore latest 73ce3cd97c01 About an hour ago .74GB
microsoft/dotnet latest 521411f3b61d days ago .73GB
用docker tag 命令修改镜像REPOSITORY、TAG后,如下
[root@localhost tmp]# docker tag xtjatswc/mycore2:v3 xtjatswc/mycore4:v4
[root@localhost tmp]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
xtjatswc/mycore2 v3 73ce3cd97c01 hours ago .74GB
xtjatswc/mycore4 v4 73ce3cd97c01 hours ago .74GB
xtjatswc/mycore latest 73ce3cd97c01 hours ago .74GB
microsoft/dotnet latest 521411f3b61d days ago .73GB
这里如果把xtjatswc/mycore:latest删掉的话,再运行容器xtjatswc/mycore4:v4,就会出现如下错误
[root@localhost tmp]# docker run --name myc3 -p : -d xtjatswc/mycore
WARNING: IPv4 forwarding is disabled. Networking will not work.
5a5cc306a6b36645d37fbf077f21ac91a53bf508e8e257aa74f353f761fcbfaf
docker: Error response from daemon: driver failed programming external connectivity on endpoint myc3 (8cb3855574298d61130294ea5d596525099d906106bbb7be7ce427dc1ab5dcd1): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d / --dport -j DNAT --to-destination 172.17.0.2: ! -i docker0: iptables: No chain/target/match by that name.
(exit status )).
[root@localhost tmp]# curl http://localhost:
curl: () Failed connect to localhost:; 拒绝连接
原因:
docker服务启动时定义的自定义链DOCKER由于某种原因被清掉
重启docker服务及可重新生成自定义链DOCKER
[root@localhost tmp]# systemctl restart docker
docker端口映射或启动容器时报错的更多相关文章
- docker端口映射或启动容器时报错Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen
现象: [root@localhost ~]# docker run -d -p 9000:80 centos:httpd /bin/sh -c /usr/local/bin/start.shd5b2 ...
- docker端口映射或启动容器时报错Error
现象: [root@localhost ~]# docker run -d -p 9000:80 centos:httpd /bin/sh -c /usr/local/bin/start.shd5b2 ...
- 详解Docker 端口映射与容器互联
详解Docker 端口映射与容器互联 1.端口映射实现访问容器 1.从外部访问容器应用 在启动容器的时候,如果不指定对应的参数,在容器外部是无法通过网络来访问容器内部的网络应用和服务的. 当容器中运行 ...
- Docker端口映射与容器互联
Docker提供了两个功能来满足访问的基本需求:一是允许映射容器内应用的服务端口到本地宿主主机:另一个是互联机制实现多个容器间通过容器名来快速实现访问. 一.端口映射实现访问容器 当容器中运行一些网络 ...
- docker——端口映射与容器互联
在生产环境中,单个服务往往是独立的,但是服务与服务之间往往是相互依赖的,这样对于容器来说,容器之间就需要相互访问.除了网络访问之外,docker还提供了另外两种方式来满足服务的访问. 一:允许映射容器 ...
- docker端口映射和容器互相访问
端口映射 容器运行时如果没有指定端口,与外界是无法通信的,比如当前我们的有一台MySQL的docker container,当前容器正在运行mysql并提供3306端口 # docker ps CON ...
- docker端口映射,批量删除容器
docker端口映射 http://blog.csdn.net/yjk13703623757/article/details/69212521 批量删除容器 http://blog.csdn.net/ ...
- Docker:docker创建容器时报错:WARNING: IPv4 forwarding is disabled. Networking will not work.
创建容器时报错: WARNING: IPv4 forwarding is disabled. Networking will not work. # docker run -it -p 30001:2 ...
- docker问题:docker端口映射错误
1 docker端口映射错误 1.1 问题描述 利用docker启动nginx容器的时候报错: 1.2 解决办法 一次执行下面的命令就可以解决 pkill docker iptables -t nat ...
随机推荐
- EF5+MVC4系列(12) 在主视图中直接用RenderAction调用子Action,并返回视图(Return View)或者分部视图(Return PartialView); 从主Action传值到子Action使用TempData传值;TempData高级用法
结论: ViewData 适用于 在一次请求中 传递数据 . 比如我们从 主Action 到 主视图, 然后在 主视图中 用 RenderAction 请求子Action的时候,就是算作 一次请求 ...
- Spark排序之SortBy
sortBy函数源码:接收三个参数,第一个参数必须,第二个和第三个参数非必要 def sortBy[K]( f: (T) => K, ascending: Boolean = true, num ...
- Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher
异常信息如下: 错误: Unexpected exception parsing XML document from class path resource [spring/applicationCo ...
- J - S-Nim
Arthur and his sister Caroll have been playing a game called Nim for some time now. Nim is played as ...
- simulation vs emulation
Hardware emulation, the use of special purpose hardware to emulate the behavior of a yet-to-be-built ...
- linux 常用 掌握要点 详细终结
linux 命令大全 每个开发者应该了解的 10 个 Linux 命令 1.查看正在执行的进程(Process) ps命令 Process Status 进程状态 语法: ps [option] ...
- Java学习者论坛【申明:来源于网络】
学习者论坛[申明:来源于网络] 1.Java学习者论坛 2.51论坛 3.csdn论坛 4.JAVA ME论坛 地址|: http://www.javaxxz.com/ 地址|: http://bbs ...
- shell参数扩展
http://zuyunfei.com/2016/03/23/Shell-Truncate-File-Extension/
- asp.net core 1.1 项目升级至 asp.net core 2.0 preview 2 与正式版
这两天把一个 asp.net core 1.1 的项目迁移到了 asp.net core 2.0 preview 2 ,在这篇随笔中记录一下. 如果项目在有 global.json 文件,需要删除或修 ...
- Codeforces 44E - Anfisa the Monkey - [水题]
题目链接:http://codeforces.com/problemset/problem/44/E 题意: 给一个字符串,让你分割成 $k$ 行,每行的字母数在 $[a,b]$ 之间. 题解: 这是 ...