Skip to content

Docs - Wrong ENTRYPOINT in the Dockerfile example #13

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

Closed
nic-lan opened this issue Jan 28, 2021 · 3 comments · Fixed by #41
Closed

Docs - Wrong ENTRYPOINT in the Dockerfile example #13

nic-lan opened this issue Jan 28, 2021 · 3 comments · Fixed by #41

Comments

@nic-lan
Copy link

nic-lan commented Jan 28, 2021

While trying to build a valid custom ruby image i found out that the ENTRYPOINT of the Dockerfile example in the readme is not valid.

In my case the gem install aws_lambda_ric put the the gem into usr/local/bundle/bin and not in usr/local/bin

So to make it work i had to change the entrypoint from

ENTRYPOINT ["/usr/local/bin/aws_lambda_ric"]

to

ENTRYPOINT [ "/usr/local/bundle/bin/aws_lambda_ric" ]

Can i open a PR on the README with the above change proposals ?

Maybe someone can find that useful.

@yebityon
Copy link

yebityon commented May 5, 2021

Thanks a lot. It was really helped :)

@tosh2230
Copy link

I tried it with the amazonlinux image used in the README and it worked fine, so I suspect that the ENTRYPOINT in the README is correct.

Then, I changed the base image to ruby:2.7-slim, I got the following error when running the Lambda function:

{
  "errorMessage": "RequestId: xxxxxxxx-xxxx-0000-xxxx-xxxxxxxxxxxx Error: fork/exec /usr/local/bin/aws_lambda_ric: no such file or directory",
  "errorType": "Runtime.InvalidEntrypoint"
}

In this case, changing the ENTRYPOINT to /usr/local/bundle/bin/aws_lambda_ric resolved the error. I think this issue is talking about something similar to the error and fix above. The installation destination changes depending on the base image, and it is necessary to match the ENTRYPOINT to it.

@kkan
Copy link

kkan commented Sep 10, 2024

With ruby:3.3 image I had to change ENTRYPOINT to /var/lang/bin/aws_lambda_ric

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

Successfully merging a pull request may close this issue.

4 participants