-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
23fcda0
commit 97e8616
Showing
3 changed files
with
29 additions
and
18 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
This file was deleted.
Oops, something went wrong.
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,28 @@ | ||
FROM eclipse-temurin:17-jdk-alpine | ||
VOLUME /tmp | ||
|
||
ARG MAVEN_VERSION=3.9.6 | ||
ARG USER_HOME_DIR="/root" | ||
ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries | ||
|
||
# Update and install curl | ||
RUN apk update; apk add curl | ||
|
||
# Install Bash | ||
RUN apk update && apk add bash | ||
|
||
# Install Maven | ||
RUN mkdir -p /usr/share/maven /usr/share/maven/ref \ | ||
&& curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \ | ||
&& tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \ | ||
&& rm -f /tmp/apache-maven.tar.gz \ | ||
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn | ||
|
||
# Export Maven environment variables | ||
ENV MAVEN_HOME /usr/share/maven | ||
ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2" | ||
|
||
COPY target/*.jar app.jar | ||
|
||
ENTRYPOINT ["java", "-jar", "/app.jar"] | ||
EXPOSE 8000 |