diff --git a/Dockerfile.koyeb b/Dockerfile.koyeb new file mode 100644 index 000000000..ddc7256dd --- /dev/null +++ b/Dockerfile.koyeb @@ -0,0 +1,34 @@ +# Start with a base image containing Maven +FROM maven:3.8.3-openjdk-17-slim AS build + +# Set the working directory in the container +WORKDIR /app + +# Copy the project source +COPY . . + +# Build the project +RUN mvn clean package + +# Use Red Hat's OpenJDK 17 as base image +FROM registry.access.redhat.com/ubi8/openjdk-17:1.14 + +# Set environment variables +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' + +# We make four distinct layers so if there are application changes the library layers can be re-used +COPY --from=build --chown=185 /app/target/quarkus-app/lib/ /deployments/lib/ +COPY --from=build --chown=185 /app/target/quarkus-app/*.jar /deployments/ +COPY --from=build --chown=185 /app/target/quarkus-app/app/ /deployments/app/ +COPY --from=build --chown=185 /app/target/quarkus-app/quarkus/ /deployments/quarkus/ + +# Expose port +EXPOSE 8081 + +# Set user +USER 185 + +# Additional environment variables +ENV AB_JOLOKIA_OFF="" +ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"