mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 12:44:07 -08:00
ci: Use --chown=node:node
in COPY commands in the custom docker image (no-changelog) (#5913)
add --chown=node:node to COPY commands By adding `--chown=node:node` when copying the source and removing `RUN chown -R node:node .`, we save several minutes during the image building process.
This commit is contained in:
parent
ee7f86394e
commit
4d5756cd01
|
@ -3,14 +3,13 @@ ARG NODE_VERSION=16
|
||||||
# 1. Create an image to build n8n
|
# 1. Create an image to build n8n
|
||||||
FROM n8nio/base:${NODE_VERSION} as builder
|
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 --chown=node:node turbo.json package.json .npmrc pnpm-lock.yaml pnpm-workspace.yaml jest.config.js tsconfig.json ./
|
||||||
COPY scripts ./scripts
|
COPY --chown=node:node scripts ./scripts
|
||||||
COPY packages ./packages
|
COPY --chown=node:node packages ./packages
|
||||||
COPY patches ./patches
|
COPY --chown=node:node patches ./patches
|
||||||
|
|
||||||
RUN apk add --update libc6-compat jq
|
RUN apk add --update libc6-compat jq
|
||||||
RUN corepack enable && corepack prepare --activate
|
RUN corepack enable && corepack prepare --activate
|
||||||
RUN chown -R node:node .
|
|
||||||
USER node
|
USER node
|
||||||
|
|
||||||
RUN pnpm install --frozen-lockfile
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
Loading…
Reference in a new issue