-
Notifications
You must be signed in to change notification settings - Fork 2k
: No such file or directoryenv: node on docker #439
Comments
yes, already use that.
same result. |
Same here. Couldn't solve it. Switched to some linux VPS for playing around. |
@DeviaVir I'm getting this with docker-compose.yml and docker-compose-windows.yml. If I attach to the running docker container using /bin/sh and attempt to call the zenbot.sh script directly I get the same error. /bin/bash does not exibit the same problem. It looks like the path variables are not setup properly in the docker image. My solution locally has been to rename zenbot.sh back to zenbot.js and use a simple zenbot.sh script to wrap the call to node as this has been more consistent working in an out of windows. I can issue a push request to fix it once I'm done testing if you would like. |
I'm having the same issue trying to run on Windows 10 Pro with Docker. @cmroche I tried your solution but may have been doing something incorrectly with this step:
What exactly should this script look like? I tried a few things with no success. |
My solution for the problem is to rename zenbot.sh to zenbot.js, remove the shebang at the top of the file, then I have two simple shell scripts to launch it based on os. On windows, zenbot.bat which calls On osx, linux, zenbot.sh which calls I also modified my Dockerfile to use neither, and just invoke node directly (since it is a well defined enironment the Dockerfile can be specific to the OS setup)
|
It looks like incorrect line ending style when cloning via windows. Open your sh files such zenbot.sh and check whats line ending style you are using. It should be unix line ending style and not windows style. |
@cmroche Thanks for the quick response. @dextervip I just tried your suggestion and it worked. My line endings after cloning were CRLF for zenbot.sh. I changed the line endings to LF for that file and re-ran |
Ok I've thought about this some. Honestly I don't like this as a solution since it prevent windows users from being able to modify the file without potentially causing more issues. The use of a .sh file to bootstrap the bot is an inherently non-windows thing to do, even though this modification would allow docker builds to work it doesn't support development of this project in that environment. My personal opinion is that we should rename it back to .js and use shell scripts to boostrap the launch when it is convenient for users, but not require it. All around I feel this is more robust. But it isn't my call. |
@cmroche if that is the solution that works on both platforms, I don't see a reason not to use it. In that sense, it is your call :) |
Running on windows with Docker Toolbox after : docker-compose build and docker-compose --file=docker-compose-windows.yml up this logs shown :
must runn mongodb first on cmd ? or what ?
The text was updated successfully, but these errors were encountered: