added possibility to set version of n8n
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user