Sign inSign up

aemooooon/flaskapp

By aemooooon

Updated almost 7 years ago

Image
0

1.0K

aemooooon/flaskapp repository overview

A Python flask app Docker container which working with nginx proxy together for Virtualiztion Assginment 3

Create a Flask Application Container
  1. Make a directory 'flaskapp' to server as a build context for the Python/Flask application image. In that directory, create a dockerfile with the following contents:
FROM ubuntu:16.04
LABEL updated_on="2019-10-18 09:00"
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get -y install python3 python3-setuptools python3-pip gunicorn3
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10

COPY lab-4-app /flaskapp
WORKDIR /flaskapp
RUN pip3 install -r requirements.txt

EXPOSE 5000
ENTRYPOINT "./startup.sh"
  1. Clone the GitHub repository aemooooon/lab-4-app into your context.
  2. Build container image with the tag: docker build -t="aemooooon/flaskapp" .
  3. Run command docker run -d --rm --name flaskapp -p 5000:5000 aemooooon/flaskapp to test. The application should works now, but for a production deployment we need to place it behind a reverse proxy server. For this, we will need a second container. Shut down flaskapp container.

Tag summary

Content type

Image

Digest

Size

181.4 MB

Last updated

almost 7 years ago

docker pull aemooooon/flaskapp