Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
Updated to properly use ENTRYPOINT  and CMD.
  • Loading branch information
nhkhai committed May 1, 2024
1 parent 283c410 commit e251504
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,18 @@ RUN chmod +x ./mvnw

# Compile the Java application.
RUN ./mvnw install -DskipTests
CMD ["./mvnw", "spring-boot:run"]

# Run as a non root user.
# RUN adduser -D myuser
# USER myuser

# Set the default command to run the Java application.
# The ENTRYPOINT instruction specifies the command that should be run.
# ENTRYPOINT ["java"]
ENTRYPOINT [ "./mvnw" ]

# The CMD instruction provides default arguments to the ENTRYPOINT command.
# CMD ["-Xmx2048M", "-jar", "/application.jar"] # Set a Java heap size of 2GB for the run.
# CMD ["-jar","/application.jar"]
# CMD ["./mvnw", "spring-boot:run"]
CMD ["spring-boot:run"]

0 comments on commit e251504

Please sign in to comment.