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

Documentation: Explain <image entrypoint> #44

Open
kingram6865 opened this issue Aug 13, 2021 · 1 comment
Open

Documentation: Explain <image entrypoint> #44

kingram6865 opened this issue Aug 13, 2021 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@kingram6865
Copy link

kingram6865 commented Aug 13, 2021

In the instructions there are some small pieces left out that make documentation difficult to understand.
This is one piece. What is the image entrypoint? I think it is wise not to assume people reading know what that is.

What are the minimum required ingredients to get this tool working?
What script names do I need to create in order to follow along with the instructions?

@multimeric
Copy link

From what I can tell, the <image entrypoint> and <(optional) image command> refer to the original entrypoint and command you specified in your dockerfile when you built the container image. You have to re-specify them when using the rie because it needs to run its own entrypoint first. These are almost always going to be the entrypoint for the Runtime Interface Client for your language of choice.

So for example if you're using Node, you will probably have the following in your dockerfile:

RUN npm install aws-lambda-ric
ENTRYPOINT ["npx", "aws-lambda-ric"]
CMD ["index.handler"]

In that case, you should invoke the rie like this:

docker run -d \
    -v ~/.aws-lambda-rie:/aws-lambda \
    -p 9000:8080 \
    myfunction:latest \
    --entrypoint /aws-lambda/aws-lambda-rie \
    npx aws-lambda-ric \
    index.handler

@ghost ghost added the documentation Improvements or additions to documentation label Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants