mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-06 18:30:57 +00:00
Update Dockerfile-do
This commit is contained in:
parent
d86c1820df
commit
1e1e03e6cb
@ -1,17 +1,17 @@
|
|||||||
# Build stage
|
# Build stage
|
||||||
FROM openjdk:17-jdk-slim AS build
|
FROM alpine:3.14 AS downloader
|
||||||
|
|
||||||
# Set the current working directory
|
# Install necessary utilities
|
||||||
WORKDIR /app
|
RUN apk add --no-cache curl jq
|
||||||
|
|
||||||
# Copy everything into the current directory in the image
|
# Set work directory
|
||||||
COPY . .
|
WORKDIR /downloader
|
||||||
|
|
||||||
# Give execution permissions to gradlew
|
# Fetch the latest release jar from GitHub
|
||||||
RUN chmod +x ./gradlew
|
RUN curl -s https://api.github.com/repos/Frooodle/Stirling-PDF/releases/latest \
|
||||||
|
| jq -r ".assets[] | select(.name == \"Stirling-PDF.jar\") | .browser_download_url" \
|
||||||
|
| xargs curl -L -o Stirling-PDF.jar
|
||||||
|
|
||||||
# Run the build
|
|
||||||
RUN ./gradlew build
|
|
||||||
|
|
||||||
# Production stage
|
# Production stage
|
||||||
FROM frooodle/stirling-pdf-base:beta4
|
FROM frooodle/stirling-pdf-base:beta4
|
||||||
@ -25,8 +25,8 @@ RUN mkdir /usr/share/fonts/opentype/noto/
|
|||||||
COPY src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/
|
COPY src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/
|
||||||
RUN fc-cache -f -v
|
RUN fc-cache -f -v
|
||||||
|
|
||||||
# Copy the application JAR file from the build stage
|
# Copy the application JAR file from the download stage
|
||||||
COPY --from=build /app/build/libs/*.jar app.jar
|
COPY --from=downloader /downloader/Stirling-PDF.jar /app.jar
|
||||||
|
|
||||||
# Expose the application port
|
# Expose the application port
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
Loading…
x
Reference in New Issue
Block a user