-
Notifications
You must be signed in to change notification settings - Fork 31
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
db9c1a2
commit 3f79565
Showing
3 changed files
with
40 additions
and
40 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,22 +1,19 @@ | ||
FROM bellsoft/liberica-runtime-container:jdk-21-stream-musl as builder | ||
LABEL authors="hendisantika" | ||
RUN mkdir /project | ||
COPY . /project | ||
WORKDIR /project | ||
|
||
# You can read these files for the information in your application | ||
RUN echo $GIT_VERSION_TAG > GIT_VERSION_TAG.txt | ||
RUN echo $GIT_COMMIT_MESSAGE > GIT_COMMIT_MESSAGE.txt | ||
RUN echo $GIT_VERSION_HASH > GIT_VERSION_HASH.txt | ||
RUN cd /project/HikariCP && ./mvnw clean package | ||
#ADD hikaricp /home/myapp/hikaricp | ||
#RUN cd hikaricp && \ | ||
RUN ./mvnw clean package | ||
FROM bellsoft/alpaquita-linux-base:stream-musl-230404 | ||
RUN addgroup -S spring && adduser -S spring -G spring | ||
USER spring:spring | ||
VOLUME /tmp | ||
WORKDIR /home/myapp | ||
COPY --from=builder /project/HikariCP/target . | ||
#FROM eclipse-temurin:21-jre-alpine | ||
FROM maven:3.9.6-eclipse-temurin-21-alpine AS build | ||
|
||
## create a nonroot user and group | ||
RUN addgroup -S spring && adduser -S spring -G spring | ||
|
||
## copy the spring jar | ||
COPY target/*.jar /opt/myApp.jar | ||
|
||
## set the nonroot user as the default user | ||
USER spring:spring | ||
|
||
## set the working directory | ||
WORKDIR /opt | ||
|
||
ENTRYPOINT ["java", "-jar", "myApp.jar"] | ||
|
||
## expose the port to the external world | ||
EXPOSE 9000 | ||
CMD ["java", "-jar", "HikariCP-0.0.1.jar"] |
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,22 @@ | ||
FROM bellsoft/liberica-runtime-container:jdk-21-stream-musl as builder | ||
LABEL authors="hendisantika" | ||
RUN mkdir /project | ||
COPY . /project/HikariCP | ||
WORKDIR /project | ||
|
||
# You can read these files for the information in your application | ||
RUN echo $GIT_VERSION_TAG > GIT_VERSION_TAG.txt | ||
RUN echo $GIT_COMMIT_MESSAGE > GIT_COMMIT_MESSAGE.txt | ||
RUN echo $GIT_VERSION_HASH > GIT_VERSION_HASH.txt | ||
#RUN #cd /project/HikariCP && ./mvnw clean package | ||
ADD /project/HikariCP /project/HikariCP | ||
#RUN cd hikaricp && \ | ||
RUN ./mvnw clean package | ||
FROM bellsoft/alpaquita-linux-base:stream-musl-230404 | ||
RUN addgroup -S spring && adduser -S spring -G spring | ||
USER spring:spring | ||
VOLUME /tmp | ||
WORKDIR /home/myapp | ||
COPY --from=builder /project/HikariCP/target . | ||
EXPOSE 9000 | ||
CMD ["java", "-jar", "HikariCP-0.0.1.jar"] |