Git Product home page Git Product logo

Comments (3)

mhart avatar mhart commented on August 14, 2024 1

Ah yeah, that's because the non-build images set an explicit docker entrypoint (so you can run lambda functions directly from the command line). You just need to override the entrypoint:

docker run -v "$PWD":/var/task --entrypoint bash -it lambci/lambda:python3.6

Now you'll notice that the python3.6 image (and live lambda) does have easy_install (in /var/lang/bin/easy_install – also in the lambda PATH) – but the python2.7 lambda does not. This should match the live Lambda behavior for these runtimes – if it doesn't, please feel free to file another issue.

from docker-lambda.

mhart avatar mhart commented on August 14, 2024

That's because you're using the build image – which has a lot more installed on it.

Try running the same command with the python2.7 or python3.6 image

from docker-lambda.

tommedema avatar tommedema commented on August 14, 2024

@mhart that makes a lot of sense, thanks!

is it still possible for me to run bash inside this container? When I try it I get

Toms-MBP-2:lambdash tommedema$ docker run -v "$PWD":/var/task -it lambci/lambda:python3.6 bash
Unable to find image 'lambci/lambda:python3.6' locally
python3.6: Pulling from lambci/lambda
5aed7bd8313c: Already exists 
d60049111ce7: Already exists 
216518d5352c: Pull complete 
47aa6025d0bc: Pull complete 
9a82bb1662ac: Pull complete 
Digest: sha256:3663b89bd1f4c4d1a4f06a77fc543422c1f0cbfc3a2f491c8c7bdc98cf9cf0b6
Status: Downloaded newer image for lambci/lambda:python3.6
START RequestId: 05edcbae-16f1-41f9-b9c2-eec21f24d71b Version: $LATEST
Bad handler 'bash': not enough values to unpack (expected 2, got 1)
END RequestId: 05edcbae-16f1-41f9-b9c2-eec21f24d71b
REPORT RequestId: 05edcbae-16f1-41f9-b9c2-eec21f24d71b Duration: 0 ms Billed Duration: 100 ms Memory Size: 1536 MB Max Memory Used: 18 MB

{"errorMessage": "Bad handler 'bash'"}

from docker-lambda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.