I have a Dockerfile with the following commands:
FROM alpine:3.7
ENV CATALINA_HOME /usr/local/tomcat
ENV PATH $CATALINA_HOME/bin:$PATH
RUN apk update && \
apk add --no-cache openjdk8 && \
apk add --no-cache curl && \
mkdir -p "$CATALINA_HOME" && \
cd /tmp && \
curl -O https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.0.M26/bin/apache-tomcat-9.
tar xvzf apache-tomcat-9.0.0.M26.tar.gz -C . && \
mv apache-tomcat-9.0.0.M26/* "$CATALINA_HOME"
COPY tomcat-users.xml "$CATALINA_HOME"/conf/
COPY context.xml "$CATALINA_HOME"/webapps/manager/META-INF/
EXPOSE 8080
CMD ["catalina.sh", "start"]
I created the image by using the next command:
sudo docker build --tag tomcat_demo .
And to start the container I used:
sudo docker run -p 8080:8080 -dit tomcat_demo
Unfortunately at the end:
Exited (0) 19 seconds ago
Can you help me figure out why the service is not available and how can I make it available?