diff --git a/docker/images/n8n-custom/Dockerfile b/docker/images/n8n-custom/Dockerfile index f6cc050711..6d1cb30900 100644 --- a/docker/images/n8n-custom/Dockerfile +++ b/docker/images/n8n-custom/Dockerfile @@ -3,14 +3,13 @@ ARG NODE_VERSION=16 # 1. Create an image to build n8n FROM n8nio/base:${NODE_VERSION} as builder -COPY turbo.json package.json .npmrc pnpm-lock.yaml pnpm-workspace.yaml jest.config.js tsconfig.json ./ -COPY scripts ./scripts -COPY packages ./packages -COPY patches ./patches +COPY --chown=node:node turbo.json package.json .npmrc pnpm-lock.yaml pnpm-workspace.yaml jest.config.js tsconfig.json ./ +COPY --chown=node:node scripts ./scripts +COPY --chown=node:node packages ./packages +COPY --chown=node:node patches ./patches RUN apk add --update libc6-compat jq RUN corepack enable && corepack prepare --activate -RUN chown -R node:node . USER node RUN pnpm install --frozen-lockfile