Docker image for Flask (Flask Homepage).
Author: Alexander Pankov [email protected]
latest - Flask 1.0.2, Python 3.7.1legacy - Flask 0.12, Python 2.7docker 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
Run docker pull python:3.7.1 to upgrade your local version of base Python image.
Clone git repository:
git clone https://github.com/alekspankov/docker-flask.git
Change directory:
cd docker-flask
Run docker pull python:2.7-onbuild to upgrade your local version of base Python image.
Clone git repository:
git clone -b legacy https://github.com/alekspankov/docker-flask.git
Change directory:
cd docker-flask
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.
Edit requirements.txt accorfing to the needs of your project.
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.
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.
requirements.txt uses Version Specifiers (see PEP-0440).Content type
Image
Digest
Size
340.2 MB
Last updated
almost 8 years ago
docker pull aleksxp/docker-flask