mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-04-23 01:01:30 +00:00
35 lines
771 B
Plaintext
35 lines
771 B
Plaintext
![]() |
# Build stage
|
||
|
FROM openjdk:17-jdk-slim AS build
|
||
|
|
||
|
# Set the current working directory
|
||
|
WORKDIR /app
|
||
|
|
||
|
# Copy everything into the current directory in the image
|
||
|
COPY . .
|
||
|
|
||
|
# Run the build
|
||
|
RUN ./gradlew build
|
||
|
|
||
|
# Production stage
|
||
|
FROM frooodle/stirling-pdf-base:beta4
|
||
|
|
||
|
# Create scripts folder and copy local scripts
|
||
|
RUN mkdir /scripts
|
||
|
COPY ./scripts/* /scripts/
|
||
|
|
||
|
# Install fonts
|
||
|
RUN mkdir /usr/share/fonts/opentype/noto/
|
||
|
COPY src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/
|
||
|
RUN fc-cache -f -v
|
||
|
|
||
|
# Copy the application JAR file from the build stage
|
||
|
COPY --from=build /app/build/libs/*.jar app.jar
|
||
|
|
||
|
# Expose the application port
|
||
|
EXPOSE 8080
|
||
|
|
||
|
# Run the application
|
||
|
RUN chmod +x /scripts/init.sh
|
||
|
ENTRYPOINT ["/scripts/init.sh"]
|
||
|
CMD ["java", "-jar", "/app.jar"]
|