From 13169574f0134ae236f8d41287bb73930b575e82 Mon Sep 17 00:00:00 2001 From: C4illin Date: Thu, 20 Jun 2024 20:23:34 +0200 Subject: [PATCH] feat: change from debian to alpine issue #34 --- Debian.Dockerfile | 12 ++++++++++++ Dockerfile | 6 ++++-- README.md | 2 +- compose.yaml | 1 + 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Debian.Dockerfile b/Debian.Dockerfile index 0bb17c9..60e8d88 100644 --- a/Debian.Dockerfile +++ b/Debian.Dockerfile @@ -13,6 +13,11 @@ RUN mkdir -p /temp/prod COPY package.json bun.lockb /temp/prod/ RUN cd /temp/prod && bun install --frozen-lockfile --production +# FROM base AS install-libjxl-tools +# download + + + # copy node_modules from temp directory # then copy all (non-ignored) project files into the image # FROM base AS prerelease @@ -42,6 +47,13 @@ RUN rm -rf /var/lib/apt/lists/partial && apt-get update -o Acquire::CompressionT ghostscript \ libvips-tools +# # libjxl is not available in the official debian repositories +# RUN wget https://github.com/libjxl/libjxl/releases/download/v0.10.2/jxl-debs-amd64-debian-bullseye-v0.10.2.tar.gz -O /tmp/jxl-debs-amd64-debian-bullseye-v0.10.2.tar.gz \ +# && mkdir -p /tmp/libjxl \ +# && tar -xvf /tmp/jxl-debs-amd64-debian-bullseye-v0.10.2.tar.gz -C /tmp/libjxl \ +# && dpkg -i /tmp/libjxl/libjxl_0.10.2_amd64.deb /tmp/libjxl/jxl_0.10.2_amd64.deb \ +# && rm -rf /tmp/jxl-debs-amd64-debian-bullseye-v0.10.2.tar.gz /tmp/libjxl + COPY --from=install /temp/prod/node_modules node_modules # COPY --from=prerelease /app/src/index.tsx /app/src/ # COPY --from=prerelease /app/package.json . diff --git a/Dockerfile b/Dockerfile index 1d9b5dc..dda7415 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,10 +31,9 @@ LABEL description="ConvertX: self-hosted online file converter supporting 700+ f LABEL repo="https://github.com/C4illin/ConvertX" # install additional dependencies -RUN apk update && apk add --no-cache \ +RUN apk --no-cache add \ pandoc \ texlive \ - texmf-dist-fontsextra \ texmf-dist-latexextra \ ffmpeg \ graphicsmagick \ @@ -42,6 +41,9 @@ RUN apk update && apk add --no-cache \ vips-tools \ libjxl-tools +# this might be needed for some latex use cases, will add it if needed. +# texmf-dist-fontsextra \ + COPY --from=install /temp/prod/node_modules node_modules # COPY --from=prerelease /app/src/index.tsx /app/src/ # COPY --from=prerelease /app/package.json . diff --git a/README.md b/README.md index 852f7ff..656f619 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ A self-hosted online file converter. Supports 831 different formats. Written wit | Converter | Use case | Converts from | Converts to | |------------------------------------------------------------------------------|---------------|---------------|-------------| -| [libjxl](https://github.com/libjxl/libjxl) | Images | 11 | 11 | +| [libjxl](https://github.com/libjxl/libjxl) | JPEG XL | 11 | 11 | | [Vips](https://github.com/libvips/libvips) | Images | 45 | 23 | | [PDFLaTeX](https://www.math.rug.nl/~trentelman/jacob/pdflatex/pdflatex.html) | Documents | 1 | 1 | | [Pandoc](https://pandoc.org/) | Documents | 43 | 65 | diff --git a/compose.yaml b/compose.yaml index 0941302..5b870f5 100644 --- a/compose.yaml +++ b/compose.yaml @@ -2,6 +2,7 @@ services: convertx: build: context: . + # dockerfile: Debian.Dockerfile volumes: - ./data:/app/data environment: