generated from telekom/reuse-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from telekom/add-build-instructions
Added build instructions and alternative multi-stage Dockerfile.
- Loading branch information
Showing
4 changed files
with
68 additions
and
8 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 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,30 @@ | ||
# SPDX-FileCopyrightText: 2023 Deutsche Telekom AG | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
FROM maven:3.9-eclipse-temurin-17-alpine AS build | ||
RUN mkdir -p /usr/app | ||
WORKDIR /usr/app | ||
ADD . /usr/app | ||
|
||
RUN mvn -f /usr/app/pom.xml clean package | ||
|
||
|
||
FROM eclipse-temurin:17-jre-alpine | ||
|
||
RUN apk add --update \ | ||
curl \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
RUN addgroup -g 1000 -S app | ||
RUN adduser -u 1000 -D -H -S -G app app | ||
|
||
USER 1000:1000 | ||
|
||
EXPOSE 8080 8082 | ||
|
||
COPY --from=build /usr/app/target/*.jar /usr/share/app.jar | ||
|
||
WORKDIR /usr/share/ | ||
|
||
CMD java $JVM_OPTS -jar /usr/share/app.jar |
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