Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

invoke local docker leaves orphan container when serverless process is killed #6004

Open
endeepak opened this issue Apr 8, 2019 · 0 comments

Comments

@endeepak
Copy link
Contributor

endeepak commented Apr 8, 2019

This is a Bug Report

Description

  • What went wrong?
    invoke local --docker leaves orphan container when serverless process is killed in between

  • What did you expect should have happened?
    Serverless should stop the container on exit i.e. cleanup resources

  • What was the config you used?

serverless.yml

service: debuggable-lambda

provider:
  name: aws
  runtime: nodejs8.10

functions:
  hello:
    handler: handler.hello

handler.js

'use strict';

require('inspector').open(5678, "0.0.0.0", true);
debugger;

module.exports.hello = async (event) => {
  let var_to_debug = "hello"
  return var_to_debug;
};
  • What stacktrace or error message from your provider did you see?
➜  debuggable-lambda docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

➜  debuggable-lambda sls invoke local -f hello --docker
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Building Docker image...
START RequestId: 907d8a72-8f7e-138a-66ae-4eccfb86e835 Version: $LATEST

Debugger listening on ws://0.0.0.0:5678/9bc4fce5-2a39-402b-9c8f-b1ebf292a6d1
For help see https://nodejs.org/en/docs/inspector

^C

➜  debuggable-lambda docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
73e5fab6432a        sls-docker          "/var/lang/bin/node …"   8 seconds ago       Up 7 seconds                            modest_mendeleev

Similar or dependent issues: None

Additional Data

  • Serverless Framework Version you're using: 1.40.0
  • Operating System: Mac OS X
  • Stack Trace: Please see above
  • Provider Error messages: Please see above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants