My suggestion of a Production Ready Docker image for a Python / Flask application.
- Small: around 50MB
- For production: no debugging servers involved
- Unique: one source code and one image for all environments
- More secure: developers don't know production's credentials
- Clean: source code includes only one extra file (Dockerfile)
- Based on Alipine image
- Cleanes the system after apk add commands
- Uses Alpine uwsgi package
- Doesn't use Supervisord. It uses a bash's job as described here
This demo uses a config setting named "MY_MODULE.name". To override it, you should provide an environment variable called "MODULE_NAME". For example:
docker run -e MODULE_NAME=my_name ...
I was able to create this image because I've learned from: