-
-
Notifications
You must be signed in to change notification settings - Fork 386
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (40 loc) · 1.7 KB
/
Dockerfile
File metadata and controls
53 lines (40 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Build stage via Gradle
FROM gradle:8.14.3-jdk17 AS builder
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends nodejs npm \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /app && chown -R gradle:gradle /app
USER gradle
WORKDIR /app
COPY --chown=gradle:gradle . /app
# Build the distribution zip
RUN gradle --no-daemon distZip
# For testing purposes, replace the Gradle build with the following to reduce delays.
# RUN mkdir -p build/distributions
# RUN curl -L -o build/distributions/quarkdown.zip https://github.com/iamgio/quarkdown/releases/download/latest/quarkdown.zip
WORKDIR build/distributions
RUN unzip quarkdown.zip && rm quarkdown.zip
# Run stage
FROM ghcr.io/puppeteer/puppeteer:24.15.0 AS runner
ENV QD_NPM_PREFIX="/home/pptruser" \
NODE_PATH="/home/pptruser/node_modules"
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends openjdk-17-jre-headless \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
USER pptruser
WORKDIR /app
COPY --from=builder /app/build/distributions/quarkdown quarkdown
ENV PATH="/app/quarkdown/bin:${PATH}"
ENTRYPOINT ["quarkdown"]
LABEL org.opencontainers.image.vendor="Quarkdown"
LABEL org.opencontainers.image.title="Quarkdown Docker image"
LABEL org.opencontainers.image.description="Versatile Markdown-based typsetting system."
LABEL org.opencontainers.image.authors="Giorgio Garofalo (iamgio) and contributors <info@quarkdown.com>"
LABEL org.opencontainers.image.url="https://quarkdown.com"
LABEL org.opencontainers.image.source="https://github.com/iamgio/quarkdown"
LABEL org.opencontainers.image.documentation="https://quarkdown.com/docs/"
LABEL org.opencontainers.image.licenses="GPL-3.0"