Files
de.captica.n8n/Dockerfile
Tobias Lehmann 7c0a5c8416
All checks were successful
Build Pipeline for de.captica.n8n / resolve_n8n_version (push) Successful in 1s
Build Pipeline for de.captica.n8n / publish_docker (push) Successful in 5m54s
added possibility to set version of n8n
2026-03-25 10:59:44 +01:00

33 lines
735 B
Docker

FROM node:lts-bookworm-slim
ARG VERSION=latest
# Update everything and install needed dependencies
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y -q \
graphicsmagick \
tzdata \
curl \
zip \
unzip \
jq \
sed \
python3 \
ca-certificates \
build-essential
# Install n8n and temporarily all packages it needs to build correctly.
RUN echo "Installing n8n version: ${VERSION}" && \
npm_config_user=root npm install -g "n8n@${VERSION}" && \
apt-get remove -y build-essential && \
apt-get autoremove -y && \
apt-get clean all
# Set a custom user to not have n8n run as root
USER node
WORKDIR /data
CMD ["n8n"]