Docker: `eb local run` tries to pass last word of `docker build` STDOUT as docker image name to `docker run`
See original GitHub issueDescription
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)
- OS: macOS Mojave 10.14.6, Python 3.9
- EBCLI version: Python
awsebcli==3.19.2
Issue Analytics
- State:
- Created 3 years ago
- Reactions:14
- Comments:27
Top GitHub Comments
I’ve been facing the same issue. Is there a way around this bug without modifying the source code?
@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!