1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-12-28 22:52:16 +03:00

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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -29,6 +29,10 @@ RUN \
FROM n8nio/base:${NODE_VERSION}
COPY --from=builder /home/node ./
COPY docker/images/n8n-custom/docker-entrypoint.sh ./
RUN \
mkdir .n8n && \
chown node:node .n8n
USER node
ENV NODE_ENV=production
ENTRYPOINT ["tini", "--", "./docker-entrypoint.sh"]

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"]