question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker: `eb local run` tries to pass last word of `docker build` STDOUT as docker image name to `docker run`

See original GitHub issue

Description

I am following the “Using the Docker Platform” tutorial, and I am encountering a bug during the “Test a container locally” step. It appears that ebcli is treating the last word of the log output as the name of a Docker image that needs to be pulled.

Steps to reproduce

Follow “Using the Docker Platform” up through the eb local run --port 5000 step.

Observed result

When I run the eb local run --port 5000 command after following the preceding instructions in the tutorial, the image appears to build correctly, but then ultimately ends with something like this:

#9 writing image sha256:25f391927f92e8e7be6edd518ab9b94f9a65ac884faba0286ec6fb61b805ae77 done
#9 DONE 2.2s
Unable to find image '2.2s:latest' locally
docker: Error response from daemon: pull access denied for 2.2s, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
ERROR: CommandError - None

Full output using the --debug flag is as follows: https://pastebin.com/GJMPKZJv. Note lines 101-107 from the paste where the script is trying to invoke docker run with the elapsed time 0.0s as the name of a docker image:

#9 DONE 0.0s
2020-11-05 22:09:43,082 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/don/docker_flask
2020-11-05 22:09:43,083 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/don/docker_flask
2020-11-05 22:09:43,083 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/don/docker_flask
2020-11-05 22:09:43,083 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/don/docker_flask
2020-11-05 22:09:43,084 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/don/docker_flask
2020-11-05 22:09:43,085 (DEBUG) ebcli.lib.utils : docker run -i -t --rm -p 5000:5000 --name d0ccf434eea8a92119299b695d27872dc19adf5a 0.0s

Expected result

I expect the docker image to successfully build and run locally.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: macOS Mojave 10.14.6, Python 3.9
  2. EBCLI version: Python awsebcli==3.19.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:14
  • Comments:27

github_iconTop GitHub Comments

5reactions
AdiPatcommented, Jan 27, 2021

I’ve been facing the same issue. Is there a way around this bug without modifying the source code?

3reactions
Palakpatel67commented, Dec 22, 2020

@ranvirm @nirisarri thanks for proposing different solutions, really appreciate it. We will look into this and try to fix it asap. Will post any updates regarding to this issue here. thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker build - Docker Documentation
docker build : The `docker build` command builds Docker images from a Dockerfile and a "context". A build's context is the set of...
Read more >
Running a Docker environment locally with the EB CLI
Run an AWS Elastic Beanstalk Docker application locally by using the EB ... docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES....
Read more >
How do I build a dockerfile if the name of the ... - Stack Overflow
@Mohnish I don't get it, what does the last ./foo do in the command? I understand the first is the path to the...
Read more >
A Docker Tutorial for Beginners
Containers - Created from Docker images and run the actual application. We create a container using docker run which we did using the...
Read more >
Containers For Deep Learning Frameworks User Guide
As an example, suppose one starts a Deep Learning GPU Training System™ (DIGITS) container with the following command: docker run --gpus all -d...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found