Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Docker-Lambci Packaging of external native modules #402

Closed
heri16 opened this issue May 28, 2018 · 4 comments
Closed

Docker-Lambci Packaging of external native modules #402

heri16 opened this issue May 28, 2018 · 4 comments

Comments

@heri16
Copy link

heri16 commented May 28, 2018

We need an feature to run npm rebuild/install inside of a docker lambci container, during the includeModules step.
Only so will the right native binaries be built.

@HyperBrain
Copy link
Member

HyperBrain commented May 29, 2018

Hi @heri16 , this is already available. See #342 (comment) for an example where the gprc library is rebuilt for the correct node version and target operating system.

The way to go here is to add a scripts section to the packager options:

# serverless.yml
custom:
  webpack:
    ...
    packagerOptions:
      scripts:
        - npm rebuild grpc --target=8.1.0 --target_arch=x64 --target_platform=linux --target_libc=glibc

@HyperBrain
Copy link
Member

@heri16 Did you try the script feature?

@hassankhan
Copy link
Contributor

Hi @heri16, closing this issue since there is a documented workaround. Please let us know if the issue persists and we can re-open it 😉

@felschr
Copy link

felschr commented Jun 18, 2019

The script doesn't seem to work for node-canvas.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants