uwsgi-nginx-flask
This Docker image allows you to create Flask web applications in Python that run with uWSGI and Nginx in a single container.
The combination of uWSGI with Nginx is a common way to deploy Python Flask web applications. It is widely used in the industry and would give you decent performance.
See unit.nginx.org/howto/flask/ for more information
This image is built by IBM to run on the IBM Z architecture and is not affiliated with any other community that provides a version of this image.
License
View license information
here
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
Versions
Use the pull string below for the version of this image you require.
1.4.0 |
docker pull icr.io/ibmz/uwsgi-nginx-flask@sha256:a2a4ddb4a10e4b1ac16e9da41ce715177ca3ac26866d73e420190462907cc907 |
Vulnerability Report | 09-13-2022 |
Version |
Pull String |
Security (IBM Cloud) |
Created |
Usage Notes
You may follow the instructions to build your project from scratch:
- Go to your project directory
- Create a Dockerfile with:
FROM icr.io/ibmz/uwsgi-nginx-flask:[tag]
COPY ./app /app
- Create an app directory and navigate to it
- Create a main.py file (it should be named like that and should be in your app directory) with:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World from Flask"
if __name__ == "__main__":
# Only for debugging while developing
app.run(host='0.0.0.0', debug=True, port=80)
- Go to the project directory (where your Dockerfile is, containing your app directory)
- Build your Flask image:
docker build -t myimage .
- Run a container based on your image:
docker run -d --name mycontainer -p 8080:80 myimage
The application should now be accesssible at port 8080 of the your ZCX systems IP.