mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08: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}
|
FROM n8nio/base:${NODE_VERSION}
|
||||||
COPY --from=builder /home/node ./
|
COPY --from=builder /home/node ./
|
||||||
COPY docker/images/n8n-custom/docker-entrypoint.sh ./
|
COPY docker/images/n8n-custom/docker-entrypoint.sh ./
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
mkdir .n8n && \
|
||||||
|
chown node:node .n8n
|
||||||
USER node
|
USER node
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENTRYPOINT ["tini", "--", "./docker-entrypoint.sh"]
|
ENTRYPOINT ["tini", "--", "./docker-entrypoint.sh"]
|
||||||
|
|
|
@ -10,13 +10,17 @@ RUN set -eux; \
|
||||||
case "$apkArch" in \
|
case "$apkArch" in \
|
||||||
'armv7') apk --no-cache add --virtual build-dependencies python3 build-base;; \
|
'armv7') apk --no-cache add --virtual build-dependencies python3 build-base;; \
|
||||||
esac && \
|
esac && \
|
||||||
npm install --loglevel=info -g --omit=dev n8n@${N8N_VERSION} && \
|
npm install -g --omit=dev n8n@${N8N_VERSION} && \
|
||||||
case "$apkArch" in \
|
case "$apkArch" in \
|
||||||
'armv7') apk del build-dependencies;; \
|
'armv7') apk del build-dependencies;; \
|
||||||
esac && \
|
esac && \
|
||||||
find /usr/local/lib/node_modules/n8n -type f -name "*.ts" -o -name "*.js.map" -o -name "*.vue" | xargs rm && \
|
find /usr/local/lib/node_modules/n8n -type f -name "*.ts" -o -name "*.js.map" -o -name "*.vue" | xargs rm && \
|
||||||
rm -rf /root/.npm
|
rm -rf /root/.npm
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
mkdir .n8n && \
|
||||||
|
chown node:node .n8n && \
|
||||||
|
ln -s /docker-entrypoint.sh /home/node/docker-entrypoint.sh
|
||||||
USER node
|
USER node
|
||||||
COPY docker-entrypoint.sh ./
|
COPY docker-entrypoint.sh ./
|
||||||
ENTRYPOINT ["tini", "--", "./docker-entrypoint.sh"]
|
ENTRYPOINT ["tini", "--", "./docker-entrypoint.sh"]
|
||||||
|
|
Loading…
Reference in a new issue