forked from jhipster/jhipster-lite
-
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.
Merge pull request jhipster#9057 from jhipster/8629-dockerfile-module…
…-should-support-gradle add gradle support for dockerfile module
- Loading branch information
Showing
10 changed files
with
232 additions
and
161 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
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
18 changes: 18 additions & 0 deletions
18
src/main/resources/generator/server/springboot/docker/Dockerfile-gradle.mustache
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 @@ | ||
FROM openjdk:21-slim | ||
COPY . /code/jhipster-app/ | ||
RUN \ | ||
cd /code/jhipster-app/ && \ | ||
rm -Rf build node_modules && \ | ||
chmod +x gradlew && \ | ||
sleep 1 && \ | ||
./gradlew assemble -x test && \ | ||
mv /code/jhipster-app/build/libs/*.jar /code/ && \ | ||
rm -Rf /code/jhipster-app/ /root/.gradle /root/.cache /tmp/* /var/tmp/* | ||
|
||
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \ | ||
JHIPSTER_SLEEP=0 \ | ||
JAVA_OPTS="" | ||
CMD echo "The application will start in ${JHIPSTER_SLEEP}s..." && \ | ||
sleep ${JHIPSTER_SLEEP} && \ | ||
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /code/*.jar | ||
EXPOSE {{serverPort}} |
File renamed without changes.
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
Oops, something went wrong.