I have the trouble that the following DOCKERFILE ends up in a exception, where it cant find /src/webui/tail -f /dev/null and thats right, because I wanted to execute only tail -f /dev/null.
docker build is working, docker run is failing!
How can I avoid that the WORKDIR path is added to the tail command?
DOCKERFILE:
FROM node:12.17.0-alpine
WORKDIR /src/webui
RUN apk update && apk add bash
CMD ["tail -f /dev/null"]
Exception:
> docker run test
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module '/src/webui/tail -f /dev/null'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
System Information:
- Docker Desktop (Windows 10 Pro)
- Docker version 19.03.8, build afacb8b