-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (47 loc) · 1.55 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM node:17-alpine
WORKDIR /app
# Install prerequisites
RUN set -ex \
&& apk add --update --no-cache curl build-base bash libpng-dev libjpeg-turbo-dev tiff-dev \
&& npm install -g svgo \
&& cd ~ \
&& curl -fSL https://github.com/google/zopfli/archive/zopfli-1.0.3.tar.gz -o zopfli-1.0.3.tar.gz \
&& tar xvfz zopfli-1.0.3.tar.gz \
&& cd zopfli-zopfli-1.0.3 \
&& make zopfli \
&& mv zopfli /usr/local/bin/ \
&& make zopflipng \
&& mv zopflipng /usr/local/bin/ \
&& cd .. \
&& rm zopfli-1.0.3.tar.gz \
&& rm -rf zopfli-zopfli-1.0.3 \
&& cd ~ \
&& curl -fSL https://github.com/google/brotli/archive/v1.0.9.tar.gz -o v1.0.9.tar.gz \
&& tar xvfz v1.0.9.tar.gz \
&& cd brotli-1.0.9 \
&& make \
&& mv bin/brotli /usr/local/bin/ \
&& cd .. \
&& rm v1.0.9.tar.gz \
&& rm -rf brotli-1.0.9 \
&& cd ~ \
&& curl -fSL https://github.com/google/guetzli/archive/v1.0.1.tar.gz -o v1.0.1.tar.gz \
&& tar xvfz v1.0.1.tar.gz \
&& cd guetzli-1.0.1 \
&& make \
&& mv bin/Release/guetzli /usr/local/bin \
&& cd .. \
&& rm v1.0.1.tar.gz \
&& rm -rf guetzli-1.0.1 \
&& curl -fSL https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.1.tar.gz -o libwebp-1.2.1.tar.gz \
&& tar xvfz libwebp-1.2.1.tar.gz \
&& cd libwebp-1.2.1 \
&& ./configure \
&& make \
&& make install \
&& cd .. \
&& rm libwebp-1.2.1.tar.gz \
&& rm -rf libwebp-1.2.1 \
&& rm -rf /var/cache/apk/*
# Install helper scripts
COPY bin/* /usr/local/bin/