I discovered a really strange behaviour of my Dockerfile. It works perfectly under my linux machine but under windows I got a weird output running my container. Could somebody check my commands and tell me what is wrong with them? Why it works under ubuntu without any problems? I thought docker ensures that it can be started in the same way under different operations systems...
Windows commands:
git clone https://github.com/falent/googleHomeAssistantExpressNodeJS.git C:\Users\%username%\Documents\googleHomeAssistantExpressNodeJS
$ cd C:\Users\%username%\Documents\googleHomeAssistantExpressNodeJS
$ sudo build -t assistant .
$ docker run -v /C/Users/%username%/Documents/googleHomeAssistantExpressNodeJS:/skill -it --name myAssistant assistant
I got this output under windows:
: not foundypoint.sh: 2: /skill/entrypoint.sh:
sleep: invalid time interval '10s\r'
Try 'sleep --help' for more information.
/skill/entrypoint.sh: 4: cd: can't cd to /skill
Dockerfile:
FROM node:slim
RUN npm install -g nodemon@1.14.7
COPY package.json /skill/package.json
RUN mkdir -p /skill/
WORKDIR /skill/
RUN npm install
COPY entrypoint.sh /skill
RUN chmod +x /skill/entrypoint.sh
ENTRYPOINT ["sh","/skill/entrypoint.sh"]
entrypoint.sh
#!/bin/sh
sleep 10s
cd /skill
npm install
nodemon