mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
refactor(core): Rebuild docker infrastructure (#8451)
This commit is contained in:
committed by
GitHub
parent
fc5c562785
commit
1db35c18e9
@@ -1,20 +1,38 @@
|
||||
ARG NODE_VERSION=18
|
||||
FROM node:${NODE_VERSION}-alpine
|
||||
|
||||
WORKDIR /home/node
|
||||
COPY .npmrc /usr/local/etc/npmrc
|
||||
# 1. Use a builder step to download various dependencies
|
||||
FROM node:${NODE_VERSION}-alpine as builder
|
||||
|
||||
RUN \
|
||||
apk add --update git openssh graphicsmagick tini tzdata ca-certificates libc6-compat && \
|
||||
npm install -g npm@9.5.1 full-icu && \
|
||||
rm -rf /var/cache/apk/* /root/.npm /tmp/* && \
|
||||
# Install fonts
|
||||
# Install fonts
|
||||
RUN \
|
||||
apk --no-cache add --virtual fonts msttcorefonts-installer fontconfig && \
|
||||
update-ms-fonts && \
|
||||
fc-cache -f && \
|
||||
apk del fonts && \
|
||||
find /usr/share/fonts/truetype/msttcorefonts/ -type l -exec unlink {} \; && \
|
||||
rm -rf /var/cache/apk/* /tmp/*
|
||||
find /usr/share/fonts/truetype/msttcorefonts/ -type l -exec unlink {} \;
|
||||
|
||||
# Install git and other OS dependencies
|
||||
RUN apk add --update git openssh graphicsmagick tini tzdata ca-certificates libc6-compat jq
|
||||
|
||||
# Update npm and install full-uci
|
||||
COPY .npmrc /usr/local/etc/npmrc
|
||||
RUN npm install -g npm@9.9.2 full-icu@1.5.0
|
||||
|
||||
# Activate corepack, and install pnpm
|
||||
WORKDIR /tmp
|
||||
COPY package.json ./
|
||||
RUN corepack enable && corepack prepare --activate
|
||||
|
||||
# Cleanup
|
||||
RUN rm -rf /lib/apk/db /var/cache/apk/ /tmp/* /root/.npm /root/.cache/node /opt/yarn*
|
||||
|
||||
# 2. Start with a new clean image and copy over the added files into a single layer
|
||||
FROM node:${NODE_VERSION}-alpine
|
||||
COPY --from=builder / /
|
||||
|
||||
# Delete this folder to make the base image backward compatible to be able to build older version images
|
||||
RUN rm -rf /tmp/v8-compile-cache*
|
||||
|
||||
WORKDIR /home/node
|
||||
ENV NODE_ICU_DATA /usr/local/lib/node_modules/full-icu
|
||||
EXPOSE 5678/tcp
|
||||
|
||||
Reference in New Issue
Block a user