Skip to content

Order of --entrypoint in example appears incorrect #31

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
gwk opened this issue Apr 16, 2021 · 2 comments
Closed

Order of --entrypoint in example appears incorrect #31

gwk opened this issue Apr 16, 2021 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@gwk
Copy link

gwk commented Apr 16, 2021

After much frustration, I just discovered that the following command in the readme does not quite work: docker run -d -v ~/.aws-lambda-rie:/aws-lambda -p 9000:8080 myfunction:latest --entrypoint /aws-lambda/aws-lambda-rie <image entrypoint> <(optional) image command>

On Docker version 20.10.5, build 55c4c88 for Mac (apple silicon), docker run appears to completely ignore the --entrypoint argument unless it is written before the image name.

Here is what ended up working for me:

docker run \
	--detach \
	--volume ~/.aws-lambda-rie:/aws-lambda \
	--publish 9000:8080 \
	--entrypoint /aws-lambda/aws-lambda-rie \
	myfunction:latest \
	/usr/local/bin/python3 -m awslambdaric func.handler

Where func.handler refers to a file func.py that contains:

def handler(event, context):
  return "My handler result."

If you agree, please update the readme. Thanks!

@mcaulifn
Copy link

Same for Docker Desktop for Windows.

@ghost
Copy link

ghost commented Aug 10, 2022

Thank you for reporting the issue gwk, this was resolved in the pull request #36 so I am closing the issue.

Thank you!

@ghost ghost closed this as completed Aug 10, 2022
@ghost ghost added the documentation Improvements or additions to documentation label Aug 17, 2022
This issue was closed.
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