🐳 Improve docker images (#1625)

* feat: docker images

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: workflow

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* cleanup to reduce image size

Co-authored-by: ahsan-virani <ahsan.virani@gmail.com>
This commit is contained in:
Carlos Alexandro Becker 2021-06-18 17:54:37 -03:00 committed by GitHub
parent f44db17654
commit a49624a17c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,14 +14,16 @@ USER root
# it needs to build it correctly.
RUN apk --update add --virtual build-dependencies python build-base ca-certificates && \
npm_config_user=root npm install -g full-icu n8n@${N8N_VERSION} && \
apk del build-dependencies
apk del build-dependencies \
&& rm -rf /root /tmp/* /var/cache/apk/* && mkdir /root;
# Install fonts
RUN apk --no-cache add --virtual fonts msttcorefonts-installer fontconfig && \
update-ms-fonts && \
fc-cache -f && \
apk del fonts && \
find /usr/share/fonts/truetype/msttcorefonts/ -type l -exec unlink {} \;
find /usr/share/fonts/truetype/msttcorefonts/ -type l -exec unlink {} \; \
&& rm -rf /root /tmp/* /var/cache/apk/* && mkdir /root
ENV NODE_ICU_DATA /usr/local/lib/node_modules/full-icu