Can't run container
Closed this issue ยท 4 comments
Hi, I'm trying to use Amplify and followed the README on how to create the container and run the image. Unfortunately, the container exist immediately and the only information from the logs are is standard_init_linux.go:185: exec user process caused "no such file or directory".
$ docker run --name mynginx1 -e API_KEY=$API_KEY -e AMPLIFY_IMAGENAME=my-service-123 -d agilys/nginx-amplify
bb1a37c524cec1f67580c1a34910495f610b625632f6c02548f847e3d47e2d50
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bb1a37c524ce agilys/nginx-amplify "/entrypoint.sh" 10 seconds ago Exited (1) 8 seconds ago mynginx1
$ docker logs mynginx1
standard_init_linux.go:185: exec user process caused "no such file or directory"
Any help on how to solve this? I built the image from the current master branch.
Regards,
Fabian
Follow-up: building the image on Windows creates the issue. Probably a CRLF/LF conversion when I cloned the repository...
Thanks for the report and self diagnosis!
same issue on Mac OS Mojave
standard_init_linux.go:190: exec user process caused "no such file or directory"
Hello @umutc !
I am Greg from NGINX Inc. I will be assisting you with this issue going forward.
The message you are seeing seems to be caused by either lack of shebang (the #!/bin/bash in first line of your script) or invalid file encoding.
Could you try run your Dockerfile and entrypoint script through utility called dos2unix that does CRLF (windows style line endings) conversion to LF (UNIX style line endings) and then retry your build?
Sincerely,
Grzegorz Dzien
DevOps Engineer
https://www.nginx.com/