Skip to content

Error when using sls-invoke local with docker image #12345

Open

Description

@Kirynn

Are you certain it's a bug?

  • Yes, it looks like a bug

Is the issue caused by a plugin?

  • It is not a plugin issue

Are you using the latest v3 release?

  • Yes, I'm using the latest v3 release

Is there an existing issue for this?

  • I have searched existing issues, it hasn't been reported yet

Issue description

The lambci images are expired and now sls invoke local will not run when using a docker image.

Service configuration (serverless.yml) content

service: test-invoke
frameworkVersion: '3'

provider:
  name: aws
  runtime: java11

package:
  artifact: build/distributions/hello.zip

functions:
  hello:
    handler: com.serverless.Handler

Command name and used flags

sls invoke local --verbose -f hello --docker

Command output

> [email protected] test
> sls invoke local --verbose -f hello --docker

Packaging⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠦ : timing config:load:flatten Completed in 1ms
Invoking function locally
Environment: darwin, node 16.20.2, framework 3.38.0 (local), plugin 7.2.0, SDK 4.5.1
Credentials: Local, "default" profile
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
Error: `docker pull --disable-content-trust=false lambci/lambda:java11` Exited with code 1
    at ChildProcess.<anonymous> (/Users/kierandmello/test-invoke/node_modules/child-process-ext/spawn.js:38:8)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess.emit (node:domain:489:12)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

Environment information

Framework Core: 3.38.0 (local) 3.25.1 (global)
Plugin: 7.2.0
SDK: 4.5.1

Activity

  1. changed the title [-]Error[/-] [+]Error when using sls-invoke with docker image[/+] on Jan 31, 2024
  2. changed the title [-]Error when using sls-invoke with docker image[/-] [+]Error when using sls-invoke local with docker image[/+] on Jan 31, 2024
  3. SurajAdsul commented on Feb 5, 2024

    @SurajAdsul

    Any update on this how to resolve the above as the docker images has been expired

  4. lepirlouit commented on Feb 21, 2024

    @lepirlouit
  5. blackknight467 commented on Mar 19, 2024

    @blackknight467

    temporary workaround until an update for v3/v4 or serverless happens:

    docker pull mlupin/docker-lambda:${runtime}
    docker image tag  mlupin/docker-lambda:${runtime} lambci/lambda:${runtime}
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions