Closed benze closed 3 years ago
The build image is not intended for running lambdas, just building them
@mhart That would definitely explain why I am running into issues.
With no tooling available by Visual Studio Code to launch as a devcontainer (ex: tar, ssh, gzip, etc), I've been trying to get the build container launched from within Visual Studio Code to run/test out the lambda as it is being built. But clearly that does not seem to work.
I guess the intent is to run the runtime container as a separate process, and only use the build container to build it then.
Yup, that's definitely the intent. Running in a build container would give a false sense of security because it has a lot more libraries and binaries installed on it than a real Lambda does.
Hi,
I just started trying out the lambci/lambda images so might be doing something wrong. However, when I try to run an interactive shell in the two containers, I find that they don't act the same. With nothing mapped to the
/var/task
folder, I expect an error to be thrown if I try to run the lambda manually from within the container.lambci/lambda:node12js.x This image is working as expected.
lambci/lambda:build-node12js.x However, if I try the exact same thing in the lambci/lambda:build-node12js.x image I get the following error message:
Running as user 994 (sbx_user1051) to ensure that the two containers are running the same. I've also tried running in different user contexts, but have the same result.
If I try to override the env variable, I then get a bad file descriptor error:
I would have expected that both the runtime image and the build image would work the same. Am I doing something wrong, or is there a problem with the build image setup/config?