
Fitter. Happier. More Productive.
- Docker in Action -
Joke
What did the hippie/yogi say when asked to get off the couch?
Real Python
Learn programming and web development through hands-on, interesting examples that are useful and fun!
Three courses: basics, web development with Flask, and advanced web development with Django
Coupon Code (50% off): FORPYTN
Today
- Docker basics (~10%)
- Development workflow (~90%) - Docker setup, local development, continous integration/delivery
What is Docker?
Containers AND Images AND Dockerfiles. Oh my!

Why Docker?
- Version control for infrastructure
- Easily distrubute/recreate your entire dev env
- Build once, run anywhere - aka The Holy Grail!

Workflow!

Docker Setup
Let's get Docker up and running!
Enter Boot2Docker - a lightweight Linux distribution designed specifically to run Docker (Install)
Fig Up!

- Fig builds and run services needed for your application.
- Install it via pip and then define the services within a fig.yml file.
Build and Run
$ fig up

Part 2 - Continuous Integration
Docker Hub
- Docker Hub is a repository of Docker images.
- It acts as a CI server since you can configure it to create a build every time you push a new commit to Github.
CircleCI

- CircleCI is a continuous integration and delivery platform that supports testing within Docker containers.
- Getting started with CircleCI - super simple setup
- Add a circle.yml config file
Feature Branch Workflow
Example...
- Create the branch
- Make changes locally
- Issue a Pull request
- Manually merge once the tests pass
- The tests run again on the master branch
- Once the second round passes, a new build is triggered on Docker Hub
Conclusion
- So, we went over a nice development workflow that included setting up a local environment coupled with continuous integration.
- What about the final piece - deliverying this app to the production environment? Make sure to check out the blog post @ realpython.com on 02/10/2015!
- michael@realpython.com

Fitter. Happier. More Productive.
- Docker in Action -
- play radiohead song
- Alright, we have a lot of material to cover so let's dive right in.