-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
root
committed
Jul 12, 2020
1 parent
26a4de1
commit 5785291
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM ubuntu:latest | ||
MAINTAINER suresh | ||
WORKDIR /opt | ||
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ | ||
ENV JRE_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre | ||
COPY ./java.sh /etc/profile.d/java.sh | ||
COPY ./maven.sh /etc/profile.d/maven.sh | ||
RUN apt update --no-install-recommends -y && \ | ||
DEBIAN_FRONTEND="noninteractive" \ | ||
apt-get install tzdata \ | ||
git \ | ||
wget \ | ||
openjdk-8-jdk \ | ||
maven --no-install-recommends -y && \ | ||
git clone https://github.com/vrer2/Sample_Project.git /root/Sample_Project/ && \ | ||
chmod +x /etc/profile.d/java.sh \ | ||
/etc/profile.d/maven.sh && \ | ||
/bin/bash -c "source /etc/profile.d/java.sh" | ||
COPY /opt/docker/maven/settings.xml /etc/maven | ||
WORKDIR /root/Sample_Project/ | ||
RUN mvn clean install && \ | ||
cp /root/Sample_Project/target/simple-web-app.war /opt/apache-tomcat-9.0.37/webapps/ && \ | ||
rm -rf /var/lib/apt/lists/* | ||
EXPOSE 8080 | ||
CMD ["catalina.sh", "run"] | ||
ENTRYPOINT ["/opt/apache-tomcat-9.0.37/bin/catalina.sh", "run"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters