File tree Expand file tree Collapse file tree 1 file changed +20
-13
lines changed Expand file tree Collapse file tree 1 file changed +20
-13
lines changed Original file line number Diff line number Diff line change 1
- FROM ubuntu
2
- RUN apt-get -y update
3
- RUN apt-get -y install openjdk-8-jdk wget
4
- RUN mkdir /opt/tomcat
5
- # COPY tomcat-8.5.37.tar.gz /tmp
6
- # RUN cd /tmp && tar xvfz tomcat-8.5.37.tar.gz
7
- # RUN mv /tmp/apache-tomcat-8.5.37/* /opt/tomcat/
8
- # RUN rm /tmp/tomcat-8.5.37.tar.gz
9
- ADD tomcat-8.5.37.tar.gz /tmp
10
- RUN mv /tmp/apache-tomcat-8.5.37/* /opt/tomcat/
11
- COPY myapp.war /opt/tomcat/webapps
1
+ # wget https://github.com/lerndevops/code/raw/main/jdk-8u331-linux-x64.tar.gz
2
+ # wget https://github.com/lerndevops/code/raw/main/apache-tomcat-9.0.63.tar.gz
3
+ # wget https://github.com/lerndevops/code/raw/main/myapp.war
4
+
5
+ FROM ubuntu:18.04
6
+
7
+ #ADD instruction with tar it extracts the tar & copies the extracted content only
8
+ ADD jdk-8u331-linux-x64.tar.gz /tmp
9
+ RUN mv /tmp/jdk1.8.0_331 /opt/java
10
+ ADD apache-tomcat-9.0.63.tar.gz /tmp
11
+ RUN mv /tmp/apache-tomcat-9.0.63 /opt/tomcat
12
+
13
+ ENV JAVA_HOME /opt/java
14
+ ENV TOMCAT_HOME /opt/tomcat
15
+ ENV JAVA_VERSION 1.8
16
+ ENV TOMCAT_VERSION 9.0.63
17
+
18
+ COPY myapp.war /opt/tomcat/webapps/
19
+
12
20
EXPOSE 8080
13
- ENTRYPOINT ["/opt/tomcat/bin/catalina.sh", "run"] ## JSON Format
14
- # ENTRYPOINT /opt/tomcat/bin/catalina.sh run ## Shell Format
21
+ CMD ["/opt/tomcat/bin/catalina.sh", "run"]
You can’t perform that action at this time.
0 commit comments