Skip to content

Instantly share code, notes, and snippets.

@lobster1234
Created July 27, 2017 09:49
Show Gist options
  • Save lobster1234/af2dc4eef3ee75117043d950c2c1ec2b to your computer and use it in GitHub Desktop.
Save lobster1234/af2dc4eef3ee75117043d950c2c1ec2b to your computer and use it in GitHub Desktop.
Dockerfile to run tomcat in an ubuntu container
FROM ubuntu:latest
RUN apt-get -y update && apt-get -y upgrade
RUN apt-get -y install openjdk-8-jdk wget
RUN mkdir /usr/local/tomcat
RUN wget http://www-us.apache.org/dist/tomcat/tomcat-8/v8.5.16/bin/apache-tomcat-8.5.16.tar.gz -O /tmp/tomcat.tar.gz
RUN cd /tmp && tar xvfz tomcat.tar.gz
RUN cp -Rv /tmp/apache-tomcat-8.5.16/* /usr/local/tomcat/
EXPOSE 8080
CMD /usr/local/tomcat/bin/catalina.sh run
@LinkSake
Copy link

Latest Tomcat version -> http://apache.stu.edu.tw/tomcat/tomcat-8/v8.5.58/bin/apache-tomcat-8.5.58.tar.gz
Remember to change the foldername too!

@Vsb19
Copy link

Vsb19 commented Dec 28, 2020

Hi,
I fallowed the same process, but the container is not starting..
But the created container is showing in the list of stopped containers

@vanbrace
Copy link

@alekseylasickiy
Copy link

alekseylasickiy commented Aug 29, 2021

@deugouegithub2020
Copy link

Great Dockerfile. For some reason, this is not working with Tomcat 10.0.14 !!

@sayed-art
Copy link

i am unable to get inside the container to give access permission what could be the reason
image
i got stuck here it is showing server startup in 2416 ms after half n hour also it is not working

@Shrirang-joshi17198
Copy link

not working with tom-cat 9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment