Thanks for that, I haven’t got a lot of experience with Docker so wasn’t aware I could do it in that way.
The fix has only partially worked - curl and the npm package get installed, but the command to curl the .sh script and pipe to sh doesn’t seem to have run, even though it runs perfectly fine when done post-boot.
Any idea why that last command to curl the .sh script to /bin/sh failed? Given curl installed correctly and was the first command in the RUN sequence, I don’t see why there was an issue with that command being run.
Also if you have a more straightforward way of installing uv, I’d be grateful to see it. I’ve had to resort to this as I’m running Alpine on WSL and the package gives segmentation faults when installed via apk for some reason.
My dockerfile:
FROM n8nio/n8n
USER root
RUN apk --no-cache add curl \
&& npm install -g n8n-nodes-youtube-transcription \
&& curl -LsSf https://astral.sh/uv/install.sh | /bin/sh
USER node
My docker-compose.yml:
version: "3.7"
services:
n8n:
build:
context: .
dockerfile: dockerfile.dockerfile
restart: always
ports:
- "127.0.0.1:5678:5678"
environment:
- N8N_PORT=5678
- N8N_PROTOCOL=https
- NODE_ENV=production
- GENERIC_TIMEZONE=Australia/Canberra
- NODE_FUNCTION_ALLOW_EXTERNAL=*
volumes:
- n8n_data:/home/node/.n8n
- "C:/Users/user/Documents/Docker\ Projects/n8n/n8n-local-files:/files"
volumes:
traefik_data:
external: true
n8n_data:
external: true
The output of the docker compose command:
C:\Users\user\Documents\Docker Projects\n8n>docker compose up -d
time="2025-03-24T22:02:03+11:00" level=warning msg="C:\\Users\\user\\Documents\\Docker Projects\\n8n\\docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion"
[+] Building 14.0s (7/7) FINISHED docker:desktop-linux
=> [n8n internal] load build definition from dockerfile.dockerfile 0.0s
=> => transferring dockerfile: 235B 0.0s
=> [n8n internal] load metadata for docker.io/n8nio/n8n:latest 1.9s
=> [n8n internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> CACHED [n8n 1/2] FROM docker.io/n8nio/n8n:latest@sha256:5288543ac4dc1ea7149a93e38a24989c913c9007dd2459f6c730a 0.0s
=> [n8n 2/2] RUN apk --no-cache add curl && npm install -g n8n-nodes-youtube-transcription && curl -LsS 11.0s
=> [n8n] exporting to image 0.8s
=> => exporting layers 0.8s
=> => writing image sha256:5c095316b86f77007a5e919b1266ca3b81f1e466df71ded0373e3e7ff7000145 0.0s
=> => naming to docker.io/library/n8n-n8n 0.0s
=> [n8n] resolving provenance for metadata file 0.0s
[+] Running 2/2
✔ n8n Built 0.0s
✔ Network n8n_default Created 0.4s
✔ n8n Built 0.0s
✔ Network n8n_default Created 0.4s
✔ Container n8n-n8n-1 Started 0.8s