Dockerfile 2.0 KB

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