Skip to content

Order of --entrypoint in example appears incorrect #31

Closed

Description

@gwk

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!

Activity

  1. mcaulifn commented on Apr 23, 2021

    @mcaulifn

    Same for Docker Desktop for Windows.

  2. ghost closed this as completedon Aug 10, 2022
  3. ghost added
    documentation
    on Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions