softprops / serverless-rust

⚡ 🦀 a serverless framework plugin for rustlang applications
https://www.npmjs.com/package/serverless-rust
MIT License
541 stars 81 forks source link

Where should I add "dockerless: true" #90

Open ColinEberhardt opened 3 years ago

ColinEberhardt commented 3 years ago

The docs indicate the addition of a custom property:

custom:
  # this section allows for customization of the default
  # serverless-rust plugin settings
  rust:
    # flags passed to cargo
    cargoFlags: '--features enable-awesome'
    # experimental! when set to true, artifacts are built locally outside of docker
+   dockerless: true

And I can see other users adopting this approach: https://github.com/NEU-DSG/dailp-encoding/blob/f0500d5a15201f3f961668aebc3b5a1990d8b649/serverless.yml#L12

However, your test cases place it in a different location: https://github.com/softprops/serverless-rust/blob/f491824d92e11123a9fecf1f58e7c1a24dec77eb/tests/integration/test-func/serverless.yml#L15

Unfortunately wherever I add this option it seems to be ignored ...

$ npm run invoke

> rust-lambda@1.0.0 invoke /Users/colineberhardt/Temp/hello_cargo/aws
> serverless invoke local -f lucky_numbers -d '{"body": "{\"name\":\" \", \"count\": 10}"}'

Serverless: Building native Rust lucky_numbers func...
docker: Error response from daemon: dial unix docker.raw.sock: connect: connection refused.
See 'docker run --help'.
Serverless: Dockerized Rust build encountered an error: undefined 125.
jquesada2016 commented 2 years ago

Did you solve this issue? I'm running into the same thing.