lambci / docker-lambda

Docker images and test runners that replicate the live AWS Lambda environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update of nodejs images

Flarna opened this issue · comments

I found that there is a difference between /var/runtime/init between the nodejs12.x image, the build-nodejs12.x image and that one within https://lambci.s3.amazonaws.com/fs/nodejs12.x.tgz

Is this intended?

I expected that the content of https://lambci.s3.amazonaws.com/fs/nodejs12.x.tgz is used for this. Or is this just a matter of timing as nodejs12.x has been published on 18.9. but build-nodejs12.x on 24.9.

By the way, these images are really great!

What difference have you found?

Just compare the size of the files:

  • in nodejs12.x.tgz 11.377.781
  • in build-nodejs12-x image 11.376.362
  • in nodejs12-x image 8.547.419

I'm assuming you're talking about /var/rapid/init, not /var/runtime/init?

It's a mock runtime, for running your code, copied here:

COPY --from=1 /var/runtime/init /var/rapid/init

From here:

COPY --from=0 /app/init /var/runtime/init

Source code is here:

https://github.com/lambci/docker-lambda/blob/master/provided/run/init.go

The build image (and tarball) have the same file that's running live on Lambda – not the mock version – but you can't run your code with that because it's expected to be in a live Lambda environment

Can you explain what you're trying to do, I'm just understanding how best I can help with this issue you've opened?

Yes, it's /var/rapid/init.

Ah ok, that explains the diff. Thinking once more about this its quite clear that something needs to be mocked.

Therefore any changes done by AWS in init require some change in the mock - which in turn depends on docs from AWS.

ok thanks for clarifying. I thought the diff was caused by some publishing issue.

@mhart I was looking for the extension APIs meanwhile documented there.

The images are up to date – that API will need to be added to the existing mock implementation