Prechádzať zdrojové kódy

feat: change from debian to alpine

issue #34
C4illin 1 rok pred
rodič
commit
13169574f0
4 zmenil súbory, kde vykonal 18 pridanie a 3 odobranie
  1. 12 0
      Debian.Dockerfile
  2. 4 2
      Dockerfile
  3. 1 1
      README.md
  4. 1 0
      compose.yaml

+ 12 - 0
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 .

+ 4 - 2
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 .

+ 1 - 1
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          |

+ 1 - 0
compose.yaml

@@ -2,6 +2,7 @@ services:
   convertx:
     build:
       context: .
+      # dockerfile: Debian.Dockerfile
     volumes:
       - ./data:/app/data
     environment: