码迷,mamicode.com
首页 > 其他好文 > 详细

【docker报错】starting container process caused "exec: \"-P8080:8080\": executable file not found in $PATH".

时间:2018-11-23 23:26:54      阅读:4600      评论:0      收藏:0      [点我收藏+]

标签:tar   containe   oci   创建   dock   erro   inux   daemon   error   

docker创建tomcat容器报错:

[root@iz2ze278r1bkrzjgp5tf08z ~]# docker run -di --name=tomcat tomcat:latest -P8080:8080
6ff68159042bf87347bc9570d4ab8151fe8ff3b5bc60333718f6a0f8fd95af5b
/usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: \"-P8080:8080\": executable file not found in $PATH".

 

解决: 将-p前移即可.
[root@iz2ze278r1bkrzjgp5tf08z ~]# docker rm tomcat
tomcat

[root@iz2ze278r1bkrzjgp5tf08z ~]# docker run -di --name=tomcat -p 8080:8080 tomcat:latest
c57b2e85c0ccc646aeacf2b8eef40314711ac87bbb727b0a889121424aa26f70

【docker报错】starting container process caused "exec: \"-P8080:8080\": executable file not found in $PATH".

标签:tar   containe   oci   创建   dock   erro   inux   daemon   error   

原文地址:https://www.cnblogs.com/163-4630227/p/10010089.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!