Switch to node user
Some checks failed
Build Pipeline for de.captica.n8n / Publish Docker (push) Failing after 1m17s

This commit is contained in:
Marc Boehm
2025-05-20 17:42:18 +02:00
parent 297fab5eb8
commit d01344b89d

View File

@@ -16,16 +16,18 @@ RUN apt-get update -y && \
build-essential
# Set a custom user to not have n8n run as root
USER root
USER node
# 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//') && \
echo "Latest n8n version: ${N8N_VERSION}" && \
npm_config_user=root npm install -g \
${N8N_VERSION} \
n8n-nodes-imap && \
apt-get clean all
${N8N_VERSION} && \
apt-get clean all && \
mkdir -p ~/.n8n/nodes && \
cd ~/.n8n/nodes && \
npm install n8n-nodes-imap
WORKDIR /data