-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (28 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
31 lines (28 loc) · 1.09 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
FROM rust:slim AS typ2docx
RUN apt update && apt install -y --no-install-recommends \
curl pkg-config libssl-dev
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
COPY pyproject.toml /
RUN /root/.local/bin/uv tool install typ2docx --verbose
# align with oven/bun:slim
FROM rust:slim-bookworm AS typst
RUN apt update && apt install -y --no-install-recommends pkg-config libssl-dev
COPY Cargo.toml /
RUN cargo install typst-cli
FROM alpine/curl AS pandoc
ARG PLATFORM=linux-amd64
ARG REPO=https://github.com/jgm/pandoc
ARG VERSION=3.8.3
ARG FILE=pandoc-${VERSION}-${PLATFORM}.tar.gz
RUN curl -L "${REPO}/releases/download/${VERSION}/${FILE}" | tar -xz
FROM oven/bun:slim
RUN apt update && \
apt install -y --no-install-recommends ca-certificates unzip rsync zip && \
rm -rf /var/lib/apt/lists/
COPY --from=pandoc /pandoc-*/bin/pandoc /usr/local/bin/
COPY --from=typst /usr/local/cargo/bin/typst /usr/local/bin/
COPY --from=typ2docx /root/.local/bin/typ2docx /usr/local/bin/
COPY --from=typ2docx /root/.local/share/uv/ /root/.local/share/uv/
COPY server.ts /
COPY index.html /
CMD ["bun", "/server.ts"]