Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

How to creat a docker image from the source codes of "python-gunicorn"? #1

Open
JenniferYingyiWu2020 opened this issue Oct 19, 2020 · 1 comment

Comments

@JenniferYingyiWu2020
Copy link

JenniferYingyiWu2020 commented Oct 19, 2020

Dear,
I have read the "usage" section of the project help document. After the line "docker run -ti -p 127.0.0.1:8000:8000 local_api gunicorn wsgi:app -c /app/gunicorn.config.py" has been read, I am so confused about the "local_api".
As I have cloned the project's codes to my local computer, and I ran the command "docker run -ti -p 127.0.0.1:8000:8000 local_api gunicorn wsgi:app -c /app/gunicorn.config.py" under the project folder. However, I encountered the following errors, so could you pls give me some suggestions? Thanks!

"Unable to find image 'local_api:latest' locally
docker: Error response from daemon: pull access denied for local_api, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'."

11

@matthieugouel
Copy link
Owner

Hi!

I think the problem is you have to build the docker image before running it. I should have included it in the documentation.
At the root of the project, you can execute the following command :

$ docker build -t local_api . 

But this project is old and I think there is better way to bootstrap new Python APIs with Docker now. I'm thinking about this project specifically : https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants