Skip to content

Commit

Permalink
new
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jul 12, 2020
1 parent 26a4de1 commit 5785291
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
26 changes: 26 additions & 0 deletions maven/Dockerfile
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"]
18 changes: 18 additions & 0 deletions maven/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ under the License.
| Specifies a further group identifier to use for plugin lookup.
<pluginGroup>com.your.plugins</pluginGroup>
-->
<pluginGroup>org.sonarsource.scanner.maven</pluginGroup>
</pluginGroups>

<!-- proxies
Expand Down Expand Up @@ -130,6 +131,11 @@ under the License.
<passphrase>optional; leave empty if not used.</passphrase>
</server>
-->
<server>
<id>deployment</id>
<username>admin</username>
<password>123</password>
</server>
</servers>

<!-- mirrors
Expand Down Expand Up @@ -244,6 +250,18 @@ under the License.
</properties>
</profile>
-->
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- Optional URL to server. Default value is http://localhost:9000 -->
<sonar.host.url>
http://3.236.81.16:9000//
</sonar.host.url>
</properties>
</profile>
</profiles>

<!-- activeProfiles
Expand Down

0 comments on commit 5785291

Please sign in to comment.