It’s just a syntax error.
Your Dockerfile is not being parsed because CMD["start"] is not valid Dockerfile syntax.
Docker instructions are parsed by splitting on whitespace. Without a space, Docker thinks the instruction name is literally CMD["start"], so it throws:
unknown instruction: CMD[“start”]
Fix 1 (the direct fix): add the required space
Change:
CMD["start"]
to:
CMD ["start"]
Docker recommends the JSON “exec form” like CMD ["executable", "param1"]. (Docker Documentation)
Fix 2 (likely what you actually meant): run npm start
If this is a Node app, start is usually an npm script, not an executable binary named start.
Use:
CMD ["npm", "start"]
(And make sure you have "scripts": { "start": "..." } in package.json.)
Hugging Face Spaces Docker note (after the build succeeds)
On Hugging Face Docker Spaces, your container must listen on the port configured by app_port in README.md (default 7860). (Hugging Face)
Also make sure your service binds to 0.0.0.0, not 127.0.0.1, or the health check can fail. (Hugging Face Forums)
If you are running n8n specifically
n8n’s URLs and webhook URLs are built from N8N_PROTOCOL, N8N_HOST, and N8N_PORT, so setting host and port correctly matters. (n8n Docs)
A minimal n8n Dockerfile pattern for Spaces looks like:
FROM docker.n8n.io/n8nio/n8n:latest
ENV N8N_HOST=0.0.0.0
ENV N8N_PORT=7860
ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
EXPOSE 7860
CMD ["n8n"]
(Your current error is still the missing space in CMD though.)
Good references
- Docker CMD exec-form recommendation: https://docs.docker.com/build/building/best-practices/ (Docker Documentation)
- Hugging Face Docker Spaces port (
app_port, default 7860): https://huggingface.co/docs/hub/en/spaces-sdks-docker (Hugging Face) - n8n webhook URL composition using
N8N_PROTOCOL/HOST/PORT: https://docs.n8n.io/hosting/configuration/configuration-examples/webhook-url/ (n8n Docs)
Summary
- Replace
CMD["start"]withCMD ["start"]. - If it’s a Node app, you probably want
CMD ["npm", "start"]. - Remove any
>>>prompt text if it’s in the Dockerfile. - For Hugging Face Spaces, make sure your app listens on the configured port (usually 7860) and binds to
0.0.0.0.