Shell script fails on Docker for windows -
i'm facing problem trying run image on docker windows.
i have dockerfile this:
from openjdk:8-jre-alpine workdir /myworkdir copy path/tomyproject/src/main/bin/start /myworkdir/start ... expose 8080 cmd [ "sh", "/myworkdir/start" ]
and here piece fails on "start" file:
#!/bin/sh script="$0" # set environment variables received command line i; case "$i" in *=*) echo $i ; key=${i%=*} value=${i#*=}; export $key=$value esac done
i have not problem building , running mac on windows (docker windows) can't run , got message:
: not found myworkdir/start: line 4: /myworkdir/start: line 6: syntax error: unexpected word (expecting "do")
if familiar , know how resolve it, please !!
try delete character \r
in script start
, example: sed -i 's/\r//g' start
copy script start
windows , rebuild image
Comments
Post a Comment