I can't believe it took so long to fix this.

This commit is contained in:
2025-05-27 13:57:13 +03:00
parent 667b72bbcb
commit dc38c1e348

View File

@@ -1,6 +1,10 @@
# Use a minimal java image # Use a minimal java image
FROM openjdk:21-jdk-slim FROM openjdk:21-jdk-slim
# Define build-time argument with default value
ARG APP_PORT=8090
ENV QUARKUS_HTTP_PORT=$APP_PORT
# Set the working directory inside the container # Set the working directory inside the container
WORKDIR /work/ WORKDIR /work/
@@ -12,10 +16,10 @@ RUN chown 1001 /work \
COPY --chown=1001:root quarkus-app/ /work/quarkus-app COPY --chown=1001:root quarkus-app/ /work/quarkus-app
# Expose the application's port # Expose the application's port
EXPOSE 8090 EXPOSE $APP_PORT
# Switch to non-root user for better security # Switch to non-root user for better security
USER 1001 USER 1001
# Define the entrypoint to run the JAR # 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"] CMD ["java", "-Dquarkus.http.host=0.0.0.0", "-Dquarkus.http.port=$QUARKUS_HTTP_PORT", "-jar", "/work/quarkus-app/quarkus-run.jar"]