Removed code since it gets generated from template and updated Dockerfile to use the jar

This commit is contained in:
2025-05-21 12:17:09 +03:00
parent dd930e8c1e
commit 2ef090f31c

View File

@@ -1,11 +1,21 @@
FROM debian:bookworm-slim
# Use a minimal java image
FROM openjdk:21-jdk-slim
# Set the working directory inside the container
WORKDIR /work/
# Set proper permissions for user 1001
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
COPY --chown=1001:root --chmod=0755 target/*-runner /work/application
# Copy the entire Quarkus app folder and set ownership
COPY --chown=1001:root quarkus-app/ /work/quarkus-app
# Expose the application's port
EXPOSE 8080
# Switch to non-root user for better security
USER 1001
ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0", "-Dquarkus.http.port=8090"]
# Define the entrypoint to run the JAR
CMD ["java", "-Dquarkus.http.host=0.0.0.0", "-Dquarkus.http.port=8090", "-jar", "/work/quarkus-app/quarkus-run.jar"]