-
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
285c4ea
commit b260130
Showing
10 changed files
with
95 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
**/README.md | ||
.* | ||
docker | ||
docs | ||
Makefile | ||
LICENSE | ||
gradle | ||
build |
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,18 @@ | ||
# Recommended: https://snyk.io/blog/best-practices-to-build-java-containers-with-docker/ | ||
|
||
# https://hub.docker.com/_/gradle | ||
FROM gradle:8.2.1-jdk17-alpine AS build | ||
RUN mkdir /project | ||
COPY . /project | ||
WORKDIR /project | ||
RUN gradle build --no-daemon | ||
|
||
# https://hub.docker.com/r/bellsoft/liberica-runtime-container | ||
FROM bellsoft/liberica-runtime-container:jre-17-slim-musl | ||
RUN mkdir /app | ||
RUN addgroup --system javauser && adduser -S -s /bin/false -G javauser javauser | ||
COPY --from=build /project/build/libs/kotlincrud-0.0.1-SNAPSHOT.jar /app/application.jar | ||
WORKDIR /app | ||
RUN chown -R javauser:javauser /app | ||
USER javauser | ||
CMD "java" "-jar" "application.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
all: build-docker-image run-docker-image | ||
|
||
build-docker-image: | ||
docker build -t kotlincrud-postgres:latest . | ||
|
||
run-docker-image: | ||
cd docker; \ | ||
docker-compose up kotlincrud-postgres |
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
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 @@ | ||
docker-compose up --build kotlincrud-postgres |
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 @@ | ||
docker-compose up mockoon postgres |
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 @@ | ||
docker-compose up kotlincrud-postgres |
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