Dockerfile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. FROM public.ecr.aws/ubuntu/ubuntu:noble
  2. ARG VIPS_VERSIONS="8.14 8.15 8.16"
  3. RUN apt-get -qq update \
  4. && apt-get install -y --no-install-recommends \
  5. bash \
  6. curl \
  7. git \
  8. ca-certificates \
  9. build-essential \
  10. gobject-introspection \
  11. libgirepository1.0-dev \
  12. python3-pip \
  13. python3-venv \
  14. libssl-dev \
  15. libglib2.0-dev \
  16. libxml2-dev \
  17. libjpeg-dev \
  18. libpng-dev \
  19. libwebp-dev \
  20. librsvg2-dev \
  21. libexif-dev \
  22. liblcms2-dev \
  23. && python3 -m venv /root/.python \
  24. && /root/.python/bin/pip install meson ninja \
  25. && rm -rf /var/lib/apt/lists/*
  26. RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
  27. && export PATH="/root/.cargo/bin:$PATH" \
  28. && cargo install cargo-c \
  29. && cd /root \
  30. && git clone --depth 1 https://github.com/DarthSim/quantizr.git \
  31. && cd quantizr \
  32. && cargo cinstall --release --library-type=cdylib --prefix=/usr/local --libdir=/usr/local/lib \
  33. && rm -rf /root/.rustup /root/.cargo
  34. ENV PATH="/root/.python/bin:$PATH"
  35. ENV LD_LIBRARY_PATH="/usr/local/lib"
  36. RUN \
  37. mkdir /root/vips \
  38. && cd /root/vips \
  39. && curl -s -S -L -o vips_releases.json "https://api.github.com/repos/libvips/libvips/releases" \
  40. && for VIPS_VERSION in $VIPS_VERSIONS; do \
  41. mkdir $VIPS_VERSION \
  42. && export VIPS_RELEASE=$(grep -m 1 "\"tag_name\": \"v$VIPS_VERSION." vips_releases.json | sed -E 's/.*"v([^"]+)".*/\1/') \
  43. && echo "Building Vips $VIPS_RELEASE as $VIPS_VERSION" \
  44. && curl -s -S -L -o libvips-$VIPS_RELEASE.tar.gz https://github.com/libvips/libvips/archive/refs/tags/v$VIPS_RELEASE.tar.gz \
  45. && tar -xzf libvips-$VIPS_RELEASE.tar.gz \
  46. && cd libvips-$VIPS_RELEASE \
  47. && meson setup _build \
  48. --buildtype=release \
  49. --strip \
  50. --prefix=/root/vips/$VIPS_VERSION \
  51. --libdir=lib \
  52. -Dgtk_doc=false \
  53. && ninja -C _build \
  54. && ninja -C _build install \
  55. && cd .. \
  56. && rm -rf libvips-$VIPS_RELEASE.tar.gz libvips-$VIPS_RELEASE; \
  57. done
  58. WORKDIR /go/src
  59. ENTRYPOINT [ "/bin/bash" ]