What I mean, is that I can simply run a command or download a .zip file that results in having a Dockerfile with the whole development environment baked in and includes not just Flask and MySQL set up, but some sort of sample nontrivial web application that already has tables made for users, posts, and that standard sort of content, along with the Python etc. code to go along with it. This would be like cloning a demo Python/Flask app from git, except it comes with a Dockerfile that configures the database, creates database users and tables, etc. A Dockerfile for other developers. Advice?

  • 1
    A Dockerized functional base web app that I can run as a Docker container, then actually create a user etc. through its web interface to test it out, and then I can extend the code from there Nov 4, 2018 at 3:53
  • It might make sense to split this into two separate questions. Nov 4, 2018 at 11:05

1 Answer 1


This question seems to be in two parts:

  1. How to deploy a flask+database app in Docker?
  2. Is there a non-trivial application to use as example?

The second part is difficult to answer, it will depend on what you consider a good example. However, an example app with the features that you want can be deployed in several ways, and will work the same if it is in Docker or otherwise.

The Docker Labs flask example contains a basic example of how to deploy a Flask app in a Docker container.

Something more appropriate to what you are looking for though is the combination of web app and backing database. For this you likely want Docker-Compose - specifically the example of Docker Compose for a Django and postgresql app

  • Thanks for the pointers. The essence of what I'm getting it is to be able to get a functional Flask+MySQL+Python app (that supports users signing up and posting content, etc.) up and running ASAP, which I could then extend to add my own features. I think people shouldn't have to re-invent the wheel 5000 times whenever they want to make a basic web app that involves users creating content, and so I want to avoid not only duplicate base code setup, but literally already have tables and core backend logic and configuration and dependencies already there. No multi-step setup. Nov 4, 2018 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.