Notes
Steps
- Setup a flask app w/ venv
- See that it works
- Write a dockerfile
- Run it, and see that the thing is running but not accessible
- docker ps
- Add exposed ports and flask config
- Compose
- Compose env variables
- Why docker?
- Same os environment on local and prod
- Runs on anything
- Ephemeral
- No dependency hell
- Repeatable builds
- Separation from the host means OS updates don’t break things
- Security: ACE probably doesn’t get to the host OS or other containers
- Simplicity: can download and run with the exact same environment with a single command
- Scalability: I can run X instances by adding a single line to a config file w/ swarm, kubes, aws, etc.
How to follow this tutorial.
- Clone the repo (or just view it on GitHub)
- Checkout the first commit using `git log` then `git checkout ….` using the commit hash from the first commit
- Checkout the following commits to follow the steps.