Error: No such container: lambda_run - DOCKER

Viewed 12

I am having trouble creating a lambda .zip file in docker. I have followed a few tutorials but to no avail. I keep getting this error when running my .sh file

Unable to find image 'google_analytics_layer:latest' locally
docker: Error response from daemon: pull access denied for google_analytics_layer, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
no such directory
Error: No such container: lambda_run
Error: No such container:path: lambda_run:/python.zip
Error response from daemon: No such container: lambda_run
Error: No such container: lambda_run
docker: invalid reference format.
See 'docker run --help'.
no such directory
Error: No such container: lambda_run
Error: No such container:path: lambda_run:/python.zip
Error response from daemon: No such container: lambda_run
Error: No such container: lambda_run

Here is the code that I'm running

container_name=lambda_run
docker_image=google_analytics_layer
docker run -td --name $container_name $docker_image
docker cp ./requirements.txt $container_name:/

docker exec -i $container_name /bin/bash < ./docker_install.sh
docker cp $container_name:/python.zip python.zip
docker stop $container_name
docker rm $container_name

and this is the tutorial that I followed: https://www.youtube.com/watch?v=jXjMrWCpaI8

1 Answers

As with any list of steps, when one step depends on another you need to stop if there's an error. Your error is in the first step. You need to locate the image google_analytics_layer that you are looking for.

The script you are trying to run is clearly labelled runner.sh in the tutorial. It's to help you run the docker image. You need to create it before you can run it.

To create it:

docker build . -t google_analytics_layer
Related