Skip to content

Commit

Permalink
BC-5159 - "simplify" Dockerfile.filestorage to reduce created layers
Browse files Browse the repository at this point in the history
  • Loading branch information
bergatco committed Oct 26, 2023
1 parent 344db0e commit b62ad39
Showing 1 changed file with 26 additions and 40 deletions.
66 changes: 26 additions & 40 deletions Dockerfile.filestorage
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ARG BASE_IMAGE
FROM $BASE_IMAGE

# install base dependencies
RUN apk add --no-cache \
dpkg-dev \
g++ \
Expand Down Expand Up @@ -31,34 +30,24 @@ RUN apk add --no-cache \
libzip-dev \
zstd-dev \
meson \
ninja

# install base dependencies (testing repository)
RUN apk add --no-cache \
jbigkit-dev \
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/

# get and build libraqm
WORKDIR /
RUN git clone https://github.com/HOST-Oman/libraqm.git
WORKDIR /libraqm
RUN meson build
RUN ninja -C build
RUN ninja -C build install

# get and build liblqr
WORKDIR /
RUN git clone https://github.com/carlobaldassi/liblqr.git
WORKDIR /liblqr
RUN ./configure
RUN make -j 4
RUN make install

# get and build ImageMagick
WORKDIR /
RUN git clone --depth 1 --branch 7.1.0-54 https://github.com/ImageMagick/ImageMagick.git
WORKDIR /ImageMagick
RUN ./configure \
ninja && \
apk add --no-cache jbigkit-dev --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ && \
cd / && \
git clone https://github.com/HOST-Oman/libraqm.git && \
cd /libraqm && \
meson build && \
ninja -C build && \
ninja -C build install && \
cd / && \
git clone https://github.com/carlobaldassi/liblqr.git && \
cd /liblqr && \
./configure && \
make -j 4 && \
make install && \
cd / && \
git clone --depth 1 --branch 7.1.0-54 https://github.com/ImageMagick/ImageMagick.git && \
cd /ImageMagick && \
./configure \
--with-bzlib=yes \
--with-djvu=yes \
--with-dps=yes \
Expand Down Expand Up @@ -93,16 +82,13 @@ RUN ./configure \
--with-zip=yes \
--with-zlib=yes \
--with-zstd=yes \
--with-gcc-arch=native
RUN make -j 4
RUN make install
RUN ldconfig /usr/local/lib

# clean up
WORKDIR /
RUN rm -rf libraqm
RUN rm -rf liblqr
RUN rm -rf ImageMagick
--with-gcc-arch=native && \
make -j 4 && \
make install && \
ldconfig /usr/local/lib && \
cd / && \
rm -rf libraqm && \
rm -rf liblqr && \
rm -rf ImageMagick

# change back to original work directory
WORKDIR /schulcloud-server

0 comments on commit b62ad39

Please sign in to comment.