-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (18 loc) · 831 Bytes
/
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
# special thx to https://github.com/343dev
# based on https://github.com/343dev/optimizt/issues/4
FROM node:18.20.4-bullseye-slim
WORKDIR /app
ENV NODE_ENV="production"
ENV SHELL="/bin/bash"
RUN apt update \
&& apt install --yes --no-install-recommends build-essential libpng16-16 libjpeg62-turbo libjpeg62-turbo-dev libpng-dev pkg-config dh-autoreconf \
&& npm install --global @343dev/optimizt chokidar-cli \
&& npm cache clean --force \
&& apt purge --yes build-essential pkg-config libpng-dev libjpeg62-turbo-dev dh-autoreconf \
&& apt autoremove --yes --purge \
&& rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man
WORKDIR /src
CMD chokidar "/src/input/**/*" \
--command "if [ '{event}' = 'add' ]; then optimizt --verbose /src/input && mv /src/input/* /src/output; fi;" \
--polling \
--verbose