Closed j-oshb closed 5 years ago
The PATH is set here https://github.com/StefanScherer/dockerfiles-windows/blob/3c2e7a48471a25867716d1a6bb876be5aaaad92b/node/10/Dockerfile#L70-L71
The problem is that Docker commands or entrypoints search for .exe
executable files only. To run npm or yarn which have .cmd
extension you have to specify it.
$ docker run stefanscherer/node-windows:10.14 yarn.cmd -v
1.10.1
$ docker run stefanscherer/node-windows:10.14 npm.cmd -v
npm info it worked if it ends with ok
npm info using npm@6.4.1
npm info using node@v10.14.1
npm timing npm Completed in 539ms
npm info ok
6.4.1
Only the node interpreter can be called without the extension:
$ docker run stefanscherer/node-windows:10.14 node -v
v10.14.1
If I run:
I get the error:
It's not a huge issue because you can still use:
I get the same issue with npm. I guess they're not added to the path.