This repository has been archived by the owner on Jul 20, 2022. It is now read-only.
-
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
Showing
3 changed files
with
64 additions
and
61 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 |
---|---|---|
@@ -1,17 +1,11 @@ | ||
# Build stage | ||
FROM maven:3.6.0-jdk-11-slim AS build | ||
COPY telegrindr/src src | ||
COPY telegrindr/pom.xml pom.xml | ||
RUN mvn -f pom.xml clean package | ||
FROM maven:3.6.3-openjdk-11-slim AS build | ||
WORKDIR /app | ||
COPY telegrindr . | ||
RUN mvn clean package | ||
|
||
#Package stage | ||
FROM openjdk:11-jre-slim | ||
VOLUME /tmp | ||
COPY --from=build target/telegrindr-1.0-SNAPSHOT.jar telegrindr.jar | ||
ARG JAVA_OPTS | ||
ARG TOKEN_ID | ||
ARG USERNAME="TelegrindrBot" | ||
ARG CREATOR_ID | ||
ENV JAVA_OPTS=$JAVA_OPTS TOKEN_ID=$TOKEN_ID USERNAME=$USERNAME CREATOR_ID=$CREATOR_ID | ||
COPY --from=build /app/target/telegrindr-1.0-SNAPSHOT.jar telegrindr.jar | ||
EXPOSE 8080 | ||
ENTRYPOINT exec java $JAVA_OPTS -jar telegrindr.jar $TOKEN_ID $USERNAME $CREATOR_ID | ||
ENTRYPOINT java $JAVA_OPTS -jar telegrindr.jar $TOKEN_ID $USERNAME $CREATOR_ID |
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