We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
The current docker file requires a maven build to occur first, which requires a user to set up Java and Maven on their local machine.
By using Docker multi-stage builds https://docs.docker.com/build/building/multi-stage/ the requirement for a local Java and Maven setup can be removed.
Below is an example of how this can be done.
Thanks
Mark
# # mark-sivill-kong - Dec 2022 # FROM openjdk:8-jdk-alpine WORKDIR /swagger-petstore RUN apk add maven COPY src/ /swagger-petstore/src COPY pom.xml /swagger-petstore/pom.xml RUN mvn --quiet package # # copy build assets into run # FROM openjdk:8-jre-alpine WORKDIR /swagger-petstore COPY src/main/resources/openapi.yaml /swagger-petstore/openapi.yaml COPY inflector.yaml /swagger-petstore/ COPY --from=0 /swagger-petstore/target/lib/jetty-runner.jar /swagger-petstore/jetty-runner.jar COPY --from=0 /swagger-petstore/target/*.war /swagger-petstore/server.war EXPOSE 8080 CMD ["java", "-jar", "-DswaggerUrl=openapi.yaml", "/swagger-petstore/jetty-runner.jar", "--log", "/var/log/yyyy_mm_dd-requests.log", "/swagger-petstore/server.war"]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
The current docker file requires a maven build to occur first, which requires a user to set up Java and Maven on their local machine.
By using Docker multi-stage builds https://docs.docker.com/build/building/multi-stage/ the requirement for a local Java and Maven setup can be removed.
Below is an example of how this can be done.
Thanks
Mark
The text was updated successfully, but these errors were encountered: