Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE-28:Upgrade Cantaloupe to 5.0.4 #29

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 45 additions & 80 deletions esmero-cantaloupe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,27 +65,22 @@ ENV JAVA_HOME=/opt/java/openjdk \
# $ docker push esmero/cantaloupe-s3:4.1.9
# If moving from Archipelago beta1 to beta3, see upgrading from 4.0.3 to 4.1.7 https://github.com/cantaloupe-project/cantaloupe/blob/develop/UPGRADING.md#40x--41

ENV CANTALOUPE_VERSION 4.1.10
aksm marked this conversation as resolved.
Show resolved Hide resolved
ENV PKGNAME=graphicsmagick
# 1.3.35 (Released Febr 23, 2020)
ENV PKGVER=1.3.35
# Uses 50% of the memory of 16. Use 16 if dealing with 48/64 bit pixels color
ENV QUANTUMDEPTH=8
ENV PKGSOURCE=http://downloads.sourceforge.net/$PKGNAME/$PKGNAME/$PKGVER/GraphicsMagick-$PKGVER.tar.lz
ENV CANTALOUPE_VERSION 5.0.4

EXPOSE 8182

RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
wget \
nasm \
libopenjp2-tools \
libopenjp2-7-dev \
liblcms2-dev \
libpng-dev \
libzstd-dev \
libtiff-dev \
libjpeg-dev \
libcairo2-dev libjpeg62-turbo-dev libpango1.0-dev libgif-dev build-essential \
libcairo2-dev libpango1.0-dev libgif-dev build-essential \
DiegoPino marked this conversation as resolved.
Show resolved Hide resolved
zlib1g-dev \
libwebp-dev \
libimage-exiftool-perl \
Expand All @@ -99,35 +94,39 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
zlib1g zlib1g-dev libxml2 libxml2-dev libltdl-dev libpng-dev libtool libopenjp2-7 libtiff-dev cmake automake autoconf make gcc g++ libimage-exiftool-perl libfreetype6-dev \
&& rm -rf /var/lib/apt/lists/*

# Install TurboJpegProcessor dependencies
RUN mkdir -p /opt/libjpeg-turbo/lib

# Graphicsmagick dependencies
#RUN apk add --no-cache --update g++ \
# gcc \
# make \
# automake \
# autoconf \
# git \
# lzip \
# wget \
# sdl-dev \
# giflib-dev \
# libjpeg-turbo-dev \
# lcms2-dev \
# libwmf-dev \
# jasper-dev \
# libx11-dev \
# libpng-dev \
# libtool \
# jasper-dev \
# bzip2-dev \
# zlib-dev \
# libxml2-dev \
# tiff-dev \
# exiftool \
# freetype-dev \
# libgomp
# Install TurboJpegProcessor
WORKDIR /tmp
RUN curl -OL https://sourceforge.net/projects/libjpeg-turbo/files/2.0.1/libjpeg-turbo-2.0.1.tar.gz \
&& tar xzvf libjpeg-turbo-2.0.1.tar.gz \
&& cd libjpeg-turbo-2.0.1 \
&& mkdir BUILD && cd BUILD \
&& cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_JAVA=1 \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_STATIC=FALSE \
-DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-2.0.1 \
-DCMAKE_INSTALL_DEFAULT_LIBDIR=lib \
.. \
&& make \
&& make test \
&& make install

# Install GrokIMageCompression

#WORKDIR /tmp
#
#RUN curl -OL https://github.com/GrokImageCompression/grok/archive/refs/tags/v9.2.0.tar.gz \
# && tar xzvf v9.2.0.tar.gz \
# && cd grok-9.2.0 \
# && mkdir BUILD && cd BUILD \
# && cmake -DCMAKE_INSTALL_PREFIX=/usr \
# -DCMAKE_BUILD_TYPE=Release \
# -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/grok-9.2.0 \
# -DCMAKE_INSTALL_DEFAULT_LIBDIR=lib \
# .. \
# && make \
# && make test \
# && make install

WORKDIR /tmp

Expand All @@ -145,56 +144,22 @@ RUN curl -OL https://github.com/jasper-software/jasper/archive/version-2.0.32/ja
&& make test \
&& make install

WORKDIR /tmp
RUN wget $PKGSOURCE && \
lzip -d -c GraphicsMagick-$PKGVER.tar.lz | tar -xvf - && \
cd GraphicsMagick-$PKGVER && \
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--enable-magick-compat \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--enable-shared \
--disable-static \
--with-modules \
--with-threads \
--with-webp=yes \
--with-tiff=yes \
--with-jpeg=yes \
--with-jp2=yes \
--with-png=yes \
--with-xml=yes \
--with-wmf=yes \
--with-ttf \
--with-gs-font-dir=/usr/share/fonts/Type1 \
--with-quantum-depth=$QUANTUMDEPTH && \
make && \
make install && \
cd /tmp && \
rm -rf GraphicsMagick-$PKGVER && \
rm GraphicsMagick-$PKGVER.tar.lz


# Cantaloupe
WORKDIR /tmp

RUN apt-get update && apt-get install -y --no-install-recommends maven unzip

RUN curl -OL https://github.com/cantaloupe-project/cantaloupe/archive/refs/heads/release/4.1.zip \
RUN curl -OL https://github.com/cantaloupe-project/cantaloupe/archive/refs/heads/release/5.0.zip \
aksm marked this conversation as resolved.
Show resolved Hide resolved
&& mkdir -p /usr/local/ \
&& cd /usr/local \
&& unzip /tmp/4.1.zip && cd cantaloupe-release-4.1 && mvn clean package -DskipTests \
&& mv target/cantaloupe-4.1.10-SNAPSHOT.zip /usr/local/ \
&& unzip /tmp/5.0.zip && cd cantaloupe-release-5.0 && mvn clean package -DskipTests \
&& mv target/cantaloupe-5.0.4.zip /usr/local/ \
&& cd /usr/local \
&& unzip cantaloupe-4.1.10-SNAPSHOT.zip \
&& ln -s cantaloupe-4.1.10-SNAPSHOT cantaloupe \
&& rm -rf /tmp/4.1.zip \
&& rm -rf /usr/local/cantaloupe-4.1.10-SNAPSHOT.zip \
&& rm -rf /usr/local/cantaloupe-release-4.1 \
&& unzip cantaloupe-5.0.4.zip \
&& ln -s cantaloupe-5.0.4 cantaloupe \
&& rm -rf /tmp/5.0.zip \
&& rm -rf /usr/local/cantaloupe-release-5.0.zip \
&& rm -rf /usr/local/cantaloupe-release-5.0 \
aksm marked this conversation as resolved.
Show resolved Hide resolved
&& ls /usr/local/cantaloupe/cantaloupe-* \
&& mkdir -p /etc/cantaloupe

Expand Down Expand Up @@ -224,5 +189,5 @@ USER $user


VOLUME ["/var/log/cantaloupe", "/var/cache/cantaloupe"]
CMD ["sh", "-c", "java -Dcantaloupe.config=/etc/cantaloupe/cantaloupe.properties -Xms${XMS} -Xmx${XMX} -jar /usr/local/cantaloupe/cantaloupe-4.1.10-SNAPSHOT.war"]
CMD ["sh", "-c", "java -Dcantaloupe.config=/etc/cantaloupe/cantaloupe.properties -Xms${XMS} -Xmx${XMX} -jar /usr/local/cantaloupe/cantaloupe-5.0.4.jar"]
aksm marked this conversation as resolved.
Show resolved Hide resolved