logspout
logspout copied to clipboard
Build fails with "/bin/sh: ./build.sh: not found"
Hello,
I have tried to follow the README on Docker Desktop for Windows, but the build failed:
PS C:\dev\GIT> docker build --build-arg LOGSPOUT_VERSION=master -t mycustomlogspout .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: CreateFile C:\dev\GIT\Dockerfile: The system cannot find the file specified.
PS C:\dev\GIT> cd .\logspout-fluentd
PS C:\dev\GIT\logspout-fluentd> docker build --build-arg LOGSPOUT_VERSION=master -t mycustomlogspout .
Sending build context to Docker daemon 180.1MB
Step 1/17 : ARG LOGSPOUT_VERSION=master
Step 2/17 : FROM gliderlabs/logspout:${LOGSPOUT_VERSION} as logspout
master: Pulling from gliderlabs/logspout
aad63a933944: Already exists 64743c68eac1: Pull complete 814834b814fe: Pull complete Digest: sha256:9a9387443cd48cd6f0cbf4af3c829a81f9a9692af316cd67534ac5afc3d0b740
Status: Downloaded newer image for gliderlabs/logspout:master
Executing 3 build triggers
---> Running in 305e38eefb73 /bin/sh: ./build.sh: not found The command '/bin/sh -c cd /src && chmod +x ./build.sh && sleep 1 && sync && ./build.sh "$(cat VERSION)-custom"' returned a non-zero code: 127
Had the same issue on windows. My solution was to change the fileendings from crlf to lf of the build.sh and it worked.