fix(docker): Make the docker images backward compatible (#3987)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-08-31 19:34:30 +02:00
committed by GitHub
parent 0426253376
commit 346ebee584
2 changed files with 9 additions and 1 deletions

View File

@@ -10,13 +10,17 @@ RUN set -eux; \
case "$apkArch" in \
'armv7') apk --no-cache add --virtual build-dependencies python3 build-base;; \
esac && \
npm install --loglevel=info -g --omit=dev n8n@${N8N_VERSION} && \
npm install -g --omit=dev n8n@${N8N_VERSION} && \
case "$apkArch" in \
'armv7') apk del build-dependencies;; \
esac && \
find /usr/local/lib/node_modules/n8n -type f -name "*.ts" -o -name "*.js.map" -o -name "*.vue" | xargs rm && \
rm -rf /root/.npm
RUN \
mkdir .n8n && \
chown node:node .n8n && \
ln -s /docker-entrypoint.sh /home/node/docker-entrypoint.sh
USER node
COPY docker-entrypoint.sh ./
ENTRYPOINT ["tini", "--", "./docker-entrypoint.sh"]