Skip to content

Conversation

@Angeluz-07
Copy link
Contributor

Add Dockerfile and instructions to run app dockerized.

Dockerfile Outdated

EXPOSE 5000

CMD ["gunicorn", "-b 0.0.0.0:5000", "run:app"] No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line here

README.md Outdated
docker run -p 5000:5000 time_tracker_api:local
```

3. Visit `0.0.0.0:5000`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually he needs to visit localhost or 127.0.0.1. The IP 0.0.0.0 makes sense inside docker but outside you will get this error
image

Copy link
Contributor

@fabidick22 fabidick22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use the ubuntu:18.04 image, I think this is a very thought image to package the application (the size of this is around 500MB), I think you can use a lighter version for this, something like Alpine Linux.
You might be interested in checking this out: https://hub.docker.com/r/tiangolo/meinheld-gunicorn-flask/tags

@fabidick22 fabidick22 merged commit fcc0e3c into master Mar 20, 2020
@enriquezrene enriquezrene deleted the feature/dockerize-app#28 branch March 21, 2020 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants