getting error "Error response from daemon: OCI runtime create failed"

+2 votes
FROM ubuntu:latest
MAINTAINER rajendrachowdary40@gmail.com
RUN apt-get update
RUN apt-get install -y openjdk-8-jdk
RUN apt-get install -y  curl
ENV JAVA_HOME=/usr
RUN mkdir /opt/tomcat/
WORKDIR /opt/tomcat
RUN curl -O  https://www-eu.apache.org/dist/tomcat/tomcat-8/v8.5.40/bin/apache-tomcat-8.5.40.tar.gz
CMD tar xvzf apache-tomcat-8.5.40.tar.gz -C /opt/tomcat/
ENTRYPOINT ["/opt/tomcat/apache-tomcat-8.5.40/bin/startup.sh && bash"]

its getting error like this

root@ip-172-31-27-71:~/docker# docker run -it raja963/new-img:latest
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/opt/tomcat/apache-tomcat-8.5.40/bin/startup.sh && bash\": stat /opt/tomcat/apache-tomcat-8.5.40/bin/startup.sh && bash: no such file or directory": unknown.
root@ip-172-31-27-71:~/dock
Aug 12 in Docker by Rajendra
• 280 points

edited Aug 13 by Kalgi 93 views
You can either use ENTRYPOINT or CMD inside a container. Using both might be conflicting at times.

Try using a single command out of them instead of both.

1 answer to this question.

0 votes
FROM: ubuntu:latest
MAINTAINER rajendrachowdary40@gmail.com
RUN apt-get update
RUN apt-get install -y openjdk-8-jdk
ENV JAVA_HOME=/usr
RUN mkdir /opt/tomcat/
WORKDIR /opt/tomcat
RUN curl -O https://www-eu.apache.org/dist/tomcat/tomcat-8/v8.5.40/bin/apache-tomcat-8.5.40.tar.gz
ADD apache-tomcat-8.5.40.tar.gz /opt/tomcat/.
COPY target/DiagnosticCentre.war /opt/tomcat/apache-tomcat-8.5.40/webapps
ENTRYPOINT /opt/tomcat/apache-tomcat-8.5.40/bin/startup.sh && bash
answered Aug 16 by Rajendra
• 280 points
Did you get rid of the error?