-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.ubuntu
More file actions
23 lines (19 loc) · 1.09 KB
/
Dockerfile.ubuntu
File metadata and controls
23 lines (19 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Ubuntu latest is the current LTS. Let's use the current Focal release.
FROM ubuntu:focal
# Set variables to allow quick changes, and visiblity.
ENV TOMCAT_VERSION 8.0.53
# Install updates, requirements, and clean up
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install openjdk-8-jdk wget && apt-get clean && rm -r /var/lib/apt/lists/*
# Note how this is a single RUN!!!
RUN wget --quiet --no-cookies https://archive.apache.org/dist/tomcat/tomcat-8/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz -O /tmp/tomcat.tgz && \
tar xzvf /tmp/tomcat.tgz -C /opt && \
mv /opt/apache-tomcat-${TOMCAT_VERSION} /opt/tomcat && \
rm /tmp/tomcat.tgz && \
rm -rf /opt/tomcat/webapps/examples && \
rm -rf /opt/tomcat/webapps/docs && \
rm -rf /opt/tomcat/webapps/ROOT
# Remember we can use COPY to chown and chmod if needed!
COPY src/sample.war /opt/tomcat/webapps/ROOT.war
# You can also use entry point. With CMD docker image:tag bash will run bash. With ENTRYPOINT bash will be the arguement.
# The right option is the one your org has standardized on.
CMD /opt/tomcat/bin/catalina.sh run