I met a really headache for this issue and almost pull my hair up and still can not resolve it. I want docker image to start automatically whenever I start it, so I came to using entrypoint, but always failed.
This is command I usually use to start my app:
cd /opt/path ./start.sh -l dev -ssl false -srv api
I now want to run this command automatically when docker get started.
I used this in docker file:
WORKDIR /opt/ngcsc
ENTRYPOINT ["start.sh","-l","kubstaging","-ssl", "false", "-srv", "api"]
I got this error:
docker: Error response from daemon: oci runtime error: exec: "start.sh": executable file not found in $PATH.
But if I change to absolute path:
ENTRYPOINT ["/opt/ngcsc/start.sh","-l","kubstaging","-ssl", "false", "-srv", "api"]
after I run docker run image
I got:
standard_init_linux.go:175: exec user process caused "exec format error"
This is really a big problem and I googled a lot, nothing worked. can you help to tell me what to do?
Thanks
/opt/ngcsc/start.shexecutable?