Bug: "Unable to find Local Image" #7824
Labels
area/docker
blocked/more-info-needed
More info is needed from the requester. If no response in 14 days, it will become stale.
Description:
Hello, I am trying to run my docker image with SAM CLI however it is not finding my local docker image that I reference in my template.
Steps to reproduce:
Create a SAM template using a docker image and docker image URI that references a local image,
sam build
,sam local invoke
and it is not finding my local docker image.Observed result:
2025-01-08 10:33:33,299 | No config file found in this directory.
2025-01-08 10:33:33,301 | OSError occurred while reading TOML file: [Errno 2] No such file or directory:
'/Users/calebanderson/Documents/source/lyceum/ellie-api/functions/split_pdfs/samconfig.toml'
2025-01-08 10:33:33,302 | Config file location: /Users/calebanderson/Documents/source/lyceum/ellie-api/functions/split_pdfs/samconfig.toml
2025-01-08 10:33:33,302 | Config file '/Users/calebanderson/Documents/source/lyceum/ellie-api/functions/split_pdfs/samconfig.toml' does not exist
2025-01-08 10:33:33,304 | Using SAM Template at /Users/calebanderson/Documents/source/lyceum/ellie-api/functions/split_pdfs/.aws-sam/build/template.yaml
2025-01-08 10:33:33,317 | OSError occurred while reading TOML file: [Errno 2] No such file or directory:
'/Users/calebanderson/Documents/source/lyceum/ellie-api/functions/split_pdfs/samconfig.toml'
2025-01-08 10:33:33,318 | Using config file: samconfig.toml, config environment: default
2025-01-08 10:33:33,318 | Expand command line arguments to:
2025-01-08 10:33:33,318 | --template_file=/Users/calebanderson/Documents/source/lyceum/ellie-api/functions/split_pdfs/.aws-sam/build/template.yaml --no_event
--layer_cache_basedir=/Users/calebanderson/.aws-sam/layers-pkg --container_host=localhost --container_host_interface=127.0.0.1
2025-01-08 10:33:33,319 | local invoke command is called
2025-01-08 10:33:33,373 | No current session found, using default AWS::AccountId
2025-01-08 10:33:33,374 | No Parameters detected in the template
2025-01-08 10:33:33,385 | There is no customer defined id or cdk path defined for resource LambdaFunction, so we will use the resource logical id as the resource id
2025-01-08 10:33:33,386 | 0 stacks found in the template
2025-01-08 10:33:33,386 | No Parameters detected in the template
2025-01-08 10:33:33,394 | There is no customer defined id or cdk path defined for resource LambdaFunction, so we will use the resource logical id as the resource id
2025-01-08 10:33:33,394 | 1 resources found in the stack
2025-01-08 10:33:33,395 | Found Serverless function with name='LambdaFunction' and ImageUri='pdf-splitter:latest'
2025-01-08 10:33:33,395 | --base-dir is not presented, adjusting uri . relative to
/Users/calebanderson/Documents/source/lyceum/ellie-api/functions/split_pdfs/.aws-sam/build/template.yaml
2025-01-08 10:33:33,396 | Skip Building LambdaFunction function, as it is missing either Dockerfile or DockerContext metadata properties.
2025-01-08 10:33:33,402 | Found one Lambda function with name 'LambdaFunction'
2025-01-08 10:33:33,403 | Invoking Container created from pdf-splitter:latest
2025-01-08 10:33:33,403 | Loading AWS credentials from session with profile 'None'
2025-01-08 10:33:33,408 | Code None is not a zip/jar file
2025-01-08 10:33:33,414 | Local image was not found.
2025-01-08 10:33:33,415 | Removing rapid images for repo pdf-splitter
Building image.........
2025-01-08 10:33:33,633 | Failed to build Docker Image
Expected result:
I would expect that SAM is able to properly locate the docker image and build my lambda function with that.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: 1.132.0The text was updated successfully, but these errors were encountered: