Skip to content

Instantly share code, notes, and snippets.

@amir-rahnama
Created January 24, 2018 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amir-rahnama/3fa66e3ca73cc427f2a314b6de4ea9e8 to your computer and use it in GitHub Desktop.
Save amir-rahnama/3fa66e3ca73cc427f2a314b6de4ea9e8 to your computer and use it in GitHub Desktop.
Dockerfile for your Flask application
FROM python:3
MAINTAINER Amir Rahnama "amirrahnama@gmail.com"
COPY . /app
WORKDIR /app
RUN pip install -r requirement.txt
RUN pip install --editable .
ENV FLASK_APP mini/app.py
RUN flask initdb
EXPOSE 5000
CMD python -m flask run --host=0.0.0.0
@amir-rahnama
Copy link
Author

Run with

docker run -p 5000:5000 <image_name> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment