added possibility to set version of n8n
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

This commit is contained in:
Tobias Lehmann
2026-03-25 10:59:44 +01:00
parent b4803b0970
commit 7c0a5c8416
2 changed files with 26 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
FROM node:lts-bookworm-slim
ARG VERSION=latest
# Update everything and install needed dependencies
RUN apt-get update -y && \
@@ -8,22 +8,18 @@ RUN apt-get update -y && \
apt-get install -y -q \
graphicsmagick \
tzdata \
curl \
curl \
zip \
unzip \
jq \
sed \
python3 \
ca-certificates \
build-essential
build-essential
# Install n8n and the also temporary all the packages
# it needs to build it correctly.
#RUN N8N_VERSION=$(curl -s https://api.github.com/repos/n8n-io/n8n/releases/latest | jq -r '.tag_name' | sed 's/^v//') && \
RUN N8N_VERSION=n8n@2.11.3 && \
echo "Latest n8n version: ${N8N_VERSION}" && \
npm_config_user=root npm install -g \
${N8N_VERSION} && \
# 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