Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Essential Docker for Python Flask Development
Rating: 4.1 out of 5(196 ratings)
1,204 students

Essential Docker for Python Flask Development

Learn how to effectively use Docker and Docker Compose to develop production ready applications
Created byJorge Escobar
Last updated 12/2017
English

What you'll learn

  • You will learn the fundamental concepts for the design of Docker Containers, specifically for Flask web development
  • You will be introduced to the Dockerfile structure
  • You will learn how to setup a server cluster using Docker Compose
  • You will learn how to effectively interact with containers, write tests and debug applications

Course content

5 sections21 lectures2h 22m total length
  • Introduction1:03
    • What do we want to accomplish in this course?
    • Prerequisites
    • What do I need to have to complete this course?
  • Introduction to Docker2:41
    • What is Docker exactly?
  • Installing the Docker Client4:54
    • The Docker Clients
      • Docker is available for both Windows and Mac Operating Systems as a native client that utilizes both of those OS’s hypervisor capabilities
    • Install Docker for Mac
      • Get dmg
      • Run it
      • Click the Whale to get preferences
      • Go to File Sharing and add "/opt"
    • Check the versions
    $ docker --version
        Docker version 1.12.0, build 8eab29e
    
    $ docker-compose --version
        docker-compose version 1.8.0, build f3628c7
    
    $ docker-machine --version
    

    docker-machine version 0.8.0, build b85aac1


  • Docker's Hello World5:09

    Check the hello-world container docker run hello-world

    • What did just happen?
      • Docker tried to check if it had a hello-world "image"
      • Since it didn't find it, it went to Docker Hub to see if it could find it there
      • It found it and downloaded the "latest" version
      • It then created a "container" based on this image
      • The container ran following the commands on the image's "Dockerfile"
  • Docker Concepts11:21
    • Images
      • Versions (:version)
      • You build an image from a Dockerfile using docker build
    • Containers
      • Running or not running
        • Use docker ps to see running containers and docker ps -a to see all containers
        • You start a container using docker run or docker start
        • You stop a container using docker stop
  • Foreground vs Background Containers8:02

    Foreground vs Background

    • Foreground: Starts the process in the container and attach the console to the process’s standard input, output, and standard error
    • Background or detached: Containers started in detached mode exit when the root process used to run the container exits
    • Example foreground container
      • Run an Ubuntu server docker run -it ubuntu:16.04 /bin/bash
        • Here we pass the -i flag which means "Keep STDIN open" i.e., the keystrokes are routed to the container
        • We also pass the '-t' flag which means "Allocate a pseudo-tty" or terminal
        • We pass the image with a version
        • The /bin/bash is an optional command we can pass the container when it starts
    • Example background container
      • Run an nginx web server docker run -d -p 80:80 --name webserver nginx
        • Here we pass a -d flag, which means "detached" or Background
        • We also pass a '--name' flag, which allows us to reference the container with a name
        • Go to localhost. "Welcome to nginx" should be up
        • Check docker ps and you should see the container
        • Stop the container using docker stop webserver
  • Section 1 Quiz

Requirements

  • A computer with internet access and administrative access to install packages
  • Good understanding of how to use the command line interface, internet and code editors
  • Good knowledge of the Flask web framework

Description

This course will teach you the essential knowledge required to integrate Docker in your everyday development flow. Docker is an easy way for developers to recreate a production-level server cluster locally in their desktop or laptop using very few resources.

A lot of companies and startups are moving to Docker, because it speeds up the development process and reduces the amount of debugging that occurs when they create software against different versions of their operating system and libraries.

The course covers the basic concepts and goes through the setup of different use cases, specifically Flask-related, from a simple web application to MySQL and MongoDB multi-server setups.

At the end of the course students will be able to write solid Dockerfiles and Docker Compose configuration files that will allow them to write software against reliable environments and without the need to install packages like Python, MySQL or MongoDB. Just install the simple Docker client for Windows or Mac and you’re set to go!

If you already know the basics of Flask and you are interested in how to setup Docker containers for their development, this is the course for you.

The course is divided in 3 sections:

  • Introduction which covers all the concepts necessary to understand how Docker works and how to install it

  • Simple Flask Containers which gently introduces to the basics of containers and how to write a good Dockerfile and how to interact with the containers

  • Docker Compose which goes into the composing part of Docker, where with one file you can spawn a complete architecture stack, like an application server and a database server running in parallel and synchronized as production environments do

The course has more than 2 hours of video tutorials as well as the source code at the end of each section, so that you can fork and play with the Docker setups.

The course can take anywhere from 1 to 3 days to complete based on how much material the student completes daily.

Additionally we’re constantly updating the course, adding contents thanks to the feedback of our students.

Join this course and continue your path to becoming a professional backend web developer!

Who this course is for:

  • Programmers and developers with basic Flask knowledge who want to expand their Docker skills
  • Application architects who want to understand better how to scale their applications
  • Startup CTOs who want to understand better best practices for application deployment
  • Computer Science Students who want to get exposed to real life concepts