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, 2019 in Docker by Rajendra
• 510 points

edited Aug 13, 2019 by Kalgi 6,362 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 17, 2019 by Rajendra
• 510 points
Did you get rid of the error?
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP