mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 05:04:05 -08:00
3667b0dd01
* ✨ Add Git-Node * 👕 Fix lint issue * 🎨 add git icon * ⚡ Fix indentation in package.json files * ⚡ Add support for pushTags * ⚡ Add support for addConfig, fetch, listConfig and status * ⚡ Add support for clone * ⚡ Remove not needed code * ⚡ Add proper continueOnFail support & alphabetize options * 🐛 Remove console.log * ⚡ Improve Git Node * ⚡ Improve Git Node * 🐳 Add git to Docker images * ⚡ Auto create folder if not exists and clarify addConfig mode Co-authored-by: Ben Hesseldieck <b.hesseldieck@gmail.com>
54 lines
1.4 KiB
Docker
54 lines
1.4 KiB
Docker
# 1. Create an image to build n8n
|
|
FROM node:14.15-alpine as builder
|
|
|
|
# Update everything and install needed dependencies
|
|
USER root
|
|
|
|
# Install all needed dependencies
|
|
RUN apk --update add --virtual build-dependencies python build-base ca-certificates && \
|
|
npm_config_user=root npm install -g lerna
|
|
|
|
WORKDIR /data
|
|
|
|
COPY lerna.json .
|
|
COPY package.json .
|
|
COPY packages/cli/ ./packages/cli/
|
|
COPY packages/core/ ./packages/core/
|
|
COPY packages/editor-ui/ ./packages/editor-ui/
|
|
COPY packages/nodes-base/ ./packages/nodes-base/
|
|
COPY packages/workflow/ ./packages/workflow/
|
|
RUN rm -rf node_modules packages/*/node_modules packages/*/dist
|
|
|
|
RUN npm install --production --loglevel notice
|
|
RUN lerna bootstrap --hoist -- --production
|
|
RUN npm run build
|
|
|
|
|
|
# 2. Start with a new clean image with just the code that is needed to run n8n
|
|
FROM node:14.15-alpine
|
|
|
|
USER root
|
|
|
|
RUN apk add --update graphicsmagick tzdata tini su-exec git
|
|
|
|
WORKDIR /data
|
|
|
|
# Install all needed dependencies
|
|
RUN npm_config_user=root npm install -g full-icu
|
|
|
|
# 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 {} \;
|
|
|
|
ENV NODE_ICU_DATA /usr/local/lib/node_modules/full-icu
|
|
|
|
COPY --from=builder /data ./
|
|
|
|
COPY docker/images/n8n-custom/docker-entrypoint.sh /docker-entrypoint.sh
|
|
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
|
|
|
|
EXPOSE 5678/tcp
|