|
| 1 | +FROM debian:buster AS builder |
| 2 | + |
| 3 | +ENV DEBIAN_FRONTEND="noninteractive" |
| 4 | + |
| 5 | +# Enable deb-src repos so we can retrieve the packages used to build libopenjp2: |
| 6 | +RUN sed -i -e '/^deb/p; s/^deb /deb-src /' /etc/apt/sources.list |
| 7 | + |
| 8 | +RUN apt-get update -qqy && apt-get dist-upgrade -qqy && apt-get install -qqy quilt devscripts && apt-get build-dep -qy libopenjp2-tools |
| 9 | + |
| 10 | +RUN adduser --system --group builder |
| 11 | +RUN install -d -o builder -g builder /build |
| 12 | + |
| 13 | +USER builder |
| 14 | + |
| 15 | +WORKDIR /build |
| 16 | + |
| 17 | +RUN apt-get source openjpeg2 |
| 18 | + |
| 19 | +WORKDIR /build/openjpeg2-2.3.0 |
| 20 | +ENV QUILT_PATCHES=debian/patches |
| 21 | + |
| 22 | +# Add the patch from https://github.com/uclouvain/openjpeg/issues/1207 |
| 23 | +COPY handle_colorspace_conflicts.patch /build/ |
| 24 | + |
| 25 | +# Apply the patch to the local source directory |
| 26 | +RUN quilt import /build/handle_colorspace_conflicts.patch |
| 27 | +RUN quilt push -a -v |
| 28 | + |
| 29 | +# Build all of the openjpeg2 packages |
| 30 | +RUN debuild -uc -us |
| 31 | + |
1 | 32 | FROM debian:buster
|
2 | 33 |
|
3 | 34 | EXPOSE 8182
|
4 | 35 |
|
5 | 36 | VOLUME /imageroot
|
6 | 37 |
|
7 |
| -# Update packages and install tools |
8 | 38 | RUN apt-get update -qy && apt-get dist-upgrade -qy && \
|
9 |
| - apt-get install -qy --no-install-recommends curl imagemagick libopenjp2-tools ffmpeg gettext unzip default-jre-headless && \ |
| 39 | + apt-get install -qy --no-install-recommends curl imagemagick ffmpeg gettext unzip default-jre-headless && \ |
10 | 40 | apt-get -qqy autoremove && apt-get -qqy autoclean
|
11 | 41 |
|
| 42 | +# Install the patched openjpeg2 tools |
| 43 | +COPY --from=builder /build/*.deb /tmp/ |
| 44 | +RUN dpkg -i /tmp/libopenjp2-*.deb /tmp/libopenjp2-tools-*.deb |
| 45 | + |
12 | 46 | # Run non privileged
|
13 | 47 | RUN adduser --system cantaloupe
|
14 | 48 |
|
|
0 commit comments