-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (22 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM debian:bullseye-slim as mozjpeg
ENV VERSION 3.3.1
RUN apt-get update && \
apt-get install -y --no-install-recommends autoconf automake checkinstall libpng-dev libtool make nasm pkg-config && \
rm -rf /var/lib/apt/lists/*
ADD https://github.com/mozilla/mozjpeg/archive/v$VERSION.tar.gz /usr/local/share
WORKDIR /usr/local/share
RUN mkdir mozjpeg && \
tar --strip-components=1 --extract --file v$VERSION.tar.gz -C mozjpeg mozjpeg-$VERSION/
WORKDIR /usr/local/share/mozjpeg
RUN autoreconf -fiv && \
mkdir build
WORKDIR /usr/local/share/mozjpeg/build
RUN ../configure && make
FROM mvhirsch/thumbor:7.5.2
RUN pip install --user --no-cache-dir thumbor-gcs thumbor-plugins thumbor-wand-engine
COPY --from=mozjpeg /usr/local/share/mozjpeg/build /usr/local/share/mozjpeg/build
RUN ln -s /usr/local/share/mozjpeg/build/cjpeg /usr/local/bin/mozjpeg
RUN apt-get update && \
apt-get install -y --no-install-recommends pngquant && \
rm -rf /var/lib/apt/lists/*
COPY fundamentals.sh /docker-entrypoint.init.d/