Comments (3)
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.
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.
@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)
- Missing files from provided.al2 HOT 1
- Need support for python3.9 HOT 10
- nodejs16.x support HOT 6
- Golang update to 1.17 HOT 1
- Is java11 image on AL2 and Corretto?
- How can I build image for python3.9 runtime? HOT 4
- Help with Debugging Go Lambda HOT 1
- Rebuild images? HOT 2
- What is the status of this project? HOT 7
- Make `myfunction` and `9001` configurable?
- Support for Node 14.x? HOT 1
- Boto3 and botocore need upgrading HOT 5
- Require image for ARM64 architecture
- Support for .NET 6
- Multi-arch support specially arm64 HOT 1
- Current ruby release (v2.7.2p137) out of date (now v2.7.6p?) HOT 1
- Missing .py file causing attributeError on lambda
- Jenkins agent install on lambci/lambda:build-python3.7 HOT 2
- Debugging with Pycharm
- [Question] Support for Provided Runtimes (Namely C++)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-lambda.