Skip to content

Commit

Permalink
fix the build for arm/v7 image
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy committed Aug 31, 2022
1 parent 3ca63ff commit df628be
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-images-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
file: ./docker/images/n8n-custom/Dockerfile
platforms: linux/amd64
push: true
tags: n8nio/n8n:${{ github.event.inputs.tag || 'nightly' }}
tags: ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.tag || 'nightly' }}
no-cache: true
- name: Call Success URL - optionally
run: |
Expand Down
2 changes: 1 addition & 1 deletion docker/images/n8n-custom/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN \


# 2. Start with a new clean image with just the code that is needed to run n8n
FROM n8nio/node:${NODE_VERSION}
FROM n8nio/base:${NODE_VERSION}
COPY --from=builder /home/node ./
COPY docker/images/n8n-custom/docker-entrypoint.sh ./
USER node
Expand Down
11 changes: 9 additions & 2 deletions docker/images/n8n/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ ARG N8N_VERSION
RUN if [ -z "$N8N_VERSION" ] ; then echo "The N8N_VERSION argument is missing!" ; exit 1; fi

ENV NODE_ENV=production
RUN \
npm install -g --omit=dev n8n@${N8N_VERSION} && \
RUN set -eux; \
apkArch="$(apk --print-arch)"; \
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} && \
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

Expand Down

0 comments on commit df628be

Please sign in to comment.