docker创建报错exec: \"catalina.sh\":
2019-08-01 本文已影响0人
运维之美
使用命令创建docker
docker run -di --name=mytomcat2 -v /usr/local/myTomcat1/:/usr/local/tomcat/ -p 9000:8080 tomcat
报如下错误
/usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: "catalina.sh": executable file not found in $PATH".

初步怀疑是docker启动的时候没有从bash中无法启动catalina.sh
查看tomcat镜像的环境设置,使用docker history imageid命令查看

从新修改命令
docker run -di --name=mytomcat5 -v /usr/local/myTomcat1/:/usr/local/tomcat/ -p 9000:8080 tomcat /bin/sh后边加上/bin/sh,正常启动
