dherault / serverless-offline

Emulate AWS λ and API Gateway locally when developing your Serverless project
MIT License
5.2k stars 794 forks source link

should serverless offline works in a docker container? #1567

Closed AntonyOnScript closed 2 years ago

AntonyOnScript commented 2 years ago

i always get this error when trying to run it in a docker container, i can't figure out where is the problem, can someone help me? image

plugins:

package: exclude:

provider: name: aws runtime: nodejs12.x

custom: serverless-offline: port: 3000 host: 0.0.0.0 useDocker: true

functions: hello: handler: app.handler events:

dnalborczyk commented 2 years ago

@AntonyOnScript you should be able to run serverless-offline in a docker container. the --useDocker option is meant for running your lambda handlers in a docker container, not serverless and serverless-offline itself. just removing the option might already be enough for you to get it to work.

dnalborczyk commented 2 years ago

closing this for good house keeping. let us know if there's any other issues.

AntonyOnScript commented 2 years ago

thanks!