mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-29 15:14:40 +03:00
fix(docker): Make the docker images backward compatible (#3987)
This commit is contained in:
parent
0426253376
commit
346ebee584
@ -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"]
|
||||
|
@ -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"]
|
||||
|
Loading…
Reference in New Issue
Block a user