10 months ago
I’m running n8n on Railway using the official Docker image (n8nio/n8n).
In my workflow, I use the Shell Command node to run a command that depends on curl (to download a video and extract frames using ffmpeg).
However, I keep getting:
bash
Copy
Edit
/bin/sh: curl: not found
I tried adding NIXPACKS_PKGS=curl, but I now realize that doesn’t work with Docker images — only Nixpacks builds.
I understand I can create a new project with a custom Dockerfile that installs curl, but I’d love to know:
Is there a way to add curl to my existing n8n Railway deployment?
If not, is forking the Docker image and deploying it as a new service the only clean solution?(also how to do it)
Any tips to avoid disconnecting it from my existing workflows?
I don’t mind starting from a new database, just want to avoid unnecessary complexity if there's a better path.
Thanks a lot in advance! 🙏
34 Replies
10 months ago
run apk add curl if you are ssh'ing into the container
Dockerfile must install curl (and other tools) at build time, not dynamically during workflow execution.
10 months ago
Create a Dockerfile with the following content:
```Dockerfile
FROM n8nio/n8n:latest
RUN apk --no-cache add curl
CMD ["n8n"]```
Try deploying it and tell me how this goes
okay so first i need to add this file to github
then i add it to the workflow right?
10 months ago
You create a Dockerfile in your github repo, then you deploy this repo in your project
10 months ago
You should also copy all env vars from your original service to this new service
10 months ago
yes.
10 months ago
let's see if it deploys fine
i got:
✕ [2/2] RUN apk --no-cache add curl
process "/bin/sh -c apk --no-cache add curl" did not complete successfully: exit code: 99
Dockerfile:3
1 | FROM n8nio/n8n:latest
2 |
3 | >>> RUN apk --no-cache add curl
4 |
5 | CMD ["n8n"]
ERROR: failed to solve: process "/bin/sh -c apk --no-cache add curl" did not complete successfully: exit code: 99
10 months ago
```Dockerfile
FROM n8nio/n8n:latest
RUN apk update && \
apk add --no-cache curl
CMD ["n8n"]```
10 months ago
try running update before
i used:
FROM node:18-alpine
Set working directory
WORKDIR /app
Install dependencies
RUN apk update && apk add --no-cache \
curl \
python3 \
make \
g++ \
git \
bash
Install n8n globally
RUN npm install -g n8n
Create config dir
RUN mkdir -p /home/node/.n8n && chown -R node:node /home/node
Run as non-root
USER node
EXPOSE 5678
CMD ["n8n"]
10 months ago
and did it work?
but same problem Problem in node ‘Execute Command‘
Command failed: curl --version /bin/sh: curl: not found
10 months ago
That's just the reference from env vars, doesn't really means that it is working.
10 months ago
could u show the deploy logs from the Dockerfile service?
Starting Container
Initializing n8n process
n8n ready on ::, port 5678
n8n detected that some packages are missing. For more information, visit https://docs.n8n.io/integrations/community-nodes/troubleshooting/
n8n Task Broker ready on 127.0.0.1, port 5679
Registered runner "JS Task Runner" (ajoEMjhWzZourHwY_56hiU)
Version: 1.86.1
Editor is now accessible via:
10 months ago
I think the issue is that this command is being run on the worker
10 months ago
And the worker isn't using this custom Dockerfile
yes if i wont to re deploy the worker, i see the new dockerfile active and not synced together
10 months ago
oh, amazing
10 months ago
glad you could do it!
10 months ago
gonna mark this as solved
10 months ago
np, sorry I couldn't be of much help! if you find another issue please open a new thread!
10 months ago
!s
Status changed to Solved medim • 10 months ago



