Skip to content

Commit 70ab551

Browse files
committed
add dockerfile
1 parent edfb945 commit 70ab551

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed

Dockerfile

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Use Eclipse Temurin JDK 11 as base
2+
FROM eclipse-temurin:17-jdk
3+
4+
# Install Maven
5+
RUN apt-get update && \
6+
apt-get install -y maven && \
7+
rm -rf /var/lib/apt/lists/*
8+
9+
ARG MAVEN_CENTRAL_USERNAME
10+
ARG MAVEN_CENTRAL_TOKEN
11+
12+
# Set working directory
13+
RUN mkdir -p /root/.m2 && \
14+
echo "<settings> \
15+
<servers> \
16+
<server> \
17+
<id>central</id> \
18+
<username>${MAVEN_CENTRAL_USERNAME}</username> \
19+
<password>${MAVEN_CENTRAL_TOKEN}</password> \
20+
</server> \
21+
</servers> \
22+
<profiles> \
23+
<profile> \
24+
<id>mastercard-base</id> \
25+
<activation> \
26+
<activeByDefault>true</activeByDefault> \
27+
</activation> \
28+
<repositories> \
29+
<repository> \
30+
<snapshots> \
31+
<enabled>false</enabled> \
32+
<updatePolicy>daily</updatePolicy> \
33+
</snapshots> \
34+
<id>public</id> \
35+
<name>public</name> \
36+
<url>https://artifacts.mastercard.int/artifactory/maven-all</url> \
37+
</repository> \
38+
<repository> \
39+
<snapshots> \
40+
<enabled>true</enabled> \
41+
<updatePolicy>daily</updatePolicy> \
42+
</snapshots> \
43+
<id>public-snapshots</id> \
44+
<name>public-snapshots</name> \
45+
<url>https://artifacts.mastercard.int/artifactory/maven-all</url> \
46+
</repository> \
47+
</repositories> \
48+
<pluginRepositories> \
49+
<pluginRepository> \
50+
<id>public-snapshots</id> \
51+
<url>https://artifacts.mastercard.int/artifactory/maven-all</url> \
52+
</pluginRepository> \
53+
<pluginRepository> \
54+
<id>public</id> \
55+
<url>https://artifacts.mastercard.int/artifactory/maven-all</url> \
56+
</pluginRepository> \
57+
<pluginRepository> \
58+
<id>snapshots</id> \
59+
<snapshots> \
60+
<enabled>true</enabled> \
61+
</snapshots> \
62+
<url>https://artifacts.mastercard.int/artifactory/maven-all</url> \
63+
</pluginRepository> \
64+
</pluginRepositories> \
65+
</profile> \
66+
</profiles> \
67+
<activeProfiles> \
68+
\
69+
<activeProfile>mastercard-base</activeProfile> \
70+
</activeProfiles> \
71+
</settings>" > /root/.m2/settings.xml \
72+
73+
# Set working directory
74+
WORKDIR /app
75+
76+
# Copy project files
77+
COPY . /app
78+
79+
# Default command: build and test
80+
CMD ["mvn", "clean", "package", "-Dmaven.javadoc.skip=false"]

pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@
224224
</goals>
225225
<configuration>
226226
<skip>${gpg.signature.skip}</skip>
227+
<gpgArguments>
228+
<arg>--pinentry-mode</arg>
229+
<arg>loopback</arg>
230+
</gpgArguments>
227231
</configuration>
228232
</execution>
229233
</executions>

0 commit comments

Comments
 (0)