Skip to content

Commit

Permalink
fix(docker): change installation method for libjxl
Browse files Browse the repository at this point in the history
Co-authored-by: Fahim <[email protected]>
Co-authored-by: darthmooguy <[email protected]>
  • Loading branch information
3 people committed Aug 7, 2023
1 parent f8e65b0 commit ad1d1da
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions komga/docker/Dockerfile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ COPY assembly/* /
RUN java -Djarmode=layertools -jar ${JAR} extract

FROM eclipse-temurin:19-jre
# Install libjxl on x64 only. Homebrew is not available on other architectures.
# Install libjxl on x64 only. It is not available on other architectures.
RUN if [ "`uname -m`" = "x86_64" ]; then \
apt -y update && \
apt -y install git gcc && \
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" && \
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" && \
brew install jpeg-xl; fi
apt -y install wget && \
wget "https://github.com/libjxl/libjxl/releases/download/v0.8.1/jxl-debs-amd64-ubuntu-22.04-v0.8.1.tar.gz" && \
tar -xzf jxl-debs-amd64-ubuntu-22.04-v0.8.1.tar.gz && \
apt -y install ./jxl_0.8.1_amd64.deb ./libjxl_0.8.1_amd64.deb ./libjxl-dev_0.8.1_amd64.deb && \
rm *.deb && rm *.ddeb && rm jxl-debs-amd64-ubuntu-22.04-v0.8.1.tar.gz && \
apt -y remove wget && apt -y clean && rm -rf /var/lib/apt/lists/*; fi

VOLUME /tmp
VOLUME /config
Expand All @@ -21,7 +23,7 @@ COPY --from=builder snapshot-dependencies/ ./
COPY --from=builder application/ ./
ENV KOMGA_CONFIGDIR="/config"
ENV LC_ALL=en_US.UTF-8
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/home/linuxbrew/.linuxbrew/lib/"
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/x86_64-linux-gnu"
ENTRYPOINT ["java", "--enable-preview", "--enable-native-access=ALL-UNNAMED", "org.springframework.boot.loader.JarLauncher", "--spring.config.additional-location=file:/config/"]
EXPOSE 25600
LABEL org.opencontainers.image.source="https://github.com/gotson/komga"

0 comments on commit ad1d1da

Please sign in to comment.