Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run container #12

Closed
fvilers opened this issue Oct 27, 2017 · 4 comments
Closed

Can't run container #12

fvilers opened this issue Oct 27, 2017 · 4 comments

Comments

@fvilers
Copy link

fvilers commented Oct 27, 2017

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

@fvilers
Copy link
Author

fvilers commented Oct 27, 2017

Follow-up: building the image on Windows creates the issue. Probably a CRLF/LF conversion when I cloned the repository...

@fvilers fvilers closed this as completed Oct 27, 2017
@gshulegaard
Copy link

Thanks for the report and self diagnosis!

@umutc
Copy link

umutc commented Dec 9, 2018

same issue on Mac OS Mojave
standard_init_linux.go:190: exec user process caused "no such file or directory"

@gdzien
Copy link
Contributor

gdzien commented Dec 11, 2018

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants