Sign inSign up

aleksxp/docker-flask

By aleksxp

Updated almost 8 years ago

Docker Flask Image

Image
0

308

aleksxp/docker-flask repository overview

Flask Docker Image

Docker Automated buil MIT Licence

Docker image for Flask (Flask Homepage).

Author: Alexander Pankov [email protected]

Tags

  • latest - Flask 1.0.2, Python 3.7.1
  • legacy - Flask 0.12, Python 2.7

Run

docker run -d --name some-flask -p 5000:5000 -v $(pwd):/usr/src/app aleksxp/flask

or

docker run -d --name some-flask -p 5000:5000 -v $(pwd):/usr/src/app aleksxp/flask:legacy

Build

Flask 1.0.2
  1. Run docker pull python:3.7.1 to upgrade your local version of base Python image.

  2. Clone git repository:

    git clone https://github.com/alekspankov/docker-flask.git
    
  3. Change directory:

    cd docker-flask
    
Flask 0.12
  1. Run docker pull python:2.7-onbuild to upgrade your local version of base Python image.

  2. Clone git repository:

    git clone -b legacy https://github.com/alekspankov/docker-flask.git
    
  3. Change directory:

    cd docker-flask
    
Common actions
  1. Edit Dockerfile according your needs. If you just want to change FLASK_ENV (see here) you can use --build-arg environment=development or --build-arg environment=production. Default environment is production.

  2. Edit requirements.txt accorfing to the needs of your project.

  3. Run docker build command (don't omit dot (.) at the end):

    docker build -t docker-flask .
    

    or, to set the development environment:

    docker build --build-arg environment=development -t docker-flask .
    

    Please notice the dot in the end og command line.

  4. Use your new image:

    docker run -d --name some-flask -p 5000:5000 -v $(pwd):/usr/src/app docker-flask
    

    See details about docker run command in the official Docker documentation.

More info

  1. requirements.txt uses Version Specifiers (see PEP-0440).
  2. Use Github Issues for bug reports / improvement suggestions.
  3. Check the wiki pages for additional documentation about this image.

Tag summary

Content type

Image

Digest

Size

340.2 MB

Last updated

almost 8 years ago

docker pull aleksxp/docker-flask