
This Lecture introduces Python in Containers Course. Course Agenda is discussed.
Discover how containers package code and dependencies into portable container images and run as isolated runtime units across platforms. Learn how containerization enables agile development, rapid deployment, and scalable microservices.
Explore container images as software packages and execution units containing Python code and dependencies, including PyInstaller apps, and learn how containers run isolated, kernel shared runtimes with writable layers.
Build, ship, and run a Python app by creating a reproducible container image, using Docker and Dockerfile, and deploying via registries like Docker Hub or gcr.io.
Explore the Docker toolset from installation to running containers across Windows, macOS, and Linux, using Docker Engine, Docker Compose, Docker Swarm, and Docker Hub to build, push, and deploy images.
Push the locally built Python Flask image to Docker Hub using docker push, after logging into Docker Desktop, publish it to your repository, and add a description for easy reuse.
Explore how to install and configure Docker across Linux, Windows, and macOS to build and run Linux containers for Python, including Docker tools, orchestration options, and Docker Hub images.
Create a Docker ID to use Docker Hub for storing images and pulling them to any container runtime, and learn to sign up, verify email, and log in.
Explore docker basics hands-on via play with docker labs; learn to create a multi-node environment, run a flask app in a docker container, build image simple-flask:v1.0.5, and expose port 5000.
Install docker on ubuntu using get-docker.sh to set up docker community edition with cli, containerd, and docker compose. Use docker machine with virtualbox and minikube for single-node kubernetes.
Explore security implications of running Docker on Linux, including root access via the Docker daemon and socket, group permissions, and the need for isolated Docker Machine environments in shared environments.
Install Docker Desktop on Windows 10 Pro, enable virtualization and Hyper-V to run Linux containers, and explore Docker Desktop settings for Kubernetes, shared drives, and Docker Hub login.
Master container lifecycles with Docker run, Docker pull, and Docker rm by using the Python image from Docker Hub to create and interact with containers on the command line.
Explore integrating python containers with a host by using docker cp, volumes and bind mounts for code, and expose applications through port mappings for seamless development.
Explore how a container image functions as a filesystem plus metadata, including layers, entrypoint and cmd definitions, environment variables, and how Docker inspect reveals image details like digest and id.
Discover how ephemeral container filesystems disappear after restart, and achieve data persistence with volumes and bind mounts. Learn to create, mount, and inspect volumes and host directories for lasting data.
Ship container images to Docker Hub by logging in, tagging, and pushing, while exploring repositories, tags, private vs public plans, collaborators, official images, and vulnerability scanning insights.
Portainer provides a web-based Docker management GUI that runs as a container and connects to local or remote runtimes, enabling standalone deployment and containers, images, networks, and volumes management.
Create and manage docker-machine instances with the VirtualBox driver, configure environment variables, map ports, and use boot2docker for a portable docker runtime.
Compare docker machine with Hyper-V and VirtualBox on Windows Pro. Create an external switch, boot with boot2docker.iso, and map ports to the machine IP.
Create and manage docker machines on Google Cloud Engine, configure credentials via gcloud or credentials.json, and open ports with firewall rules to run python in containers.
In this Lecture we look at all Components necessary to build a Container with Python Application.
In this Lecture we review a typical workflow of actions in lifecycle of Container with Python Application.
Key Design Principles of Containerized Python Application are reviewed in this Lecture.
Automate Python image builds with a Dockerfile and context, using from, workdir, copy, run, env, and cmd to install libraries, set startup commands, and test production-ready images.
Master the from command and Dockerfile basics like workdir, copy, env, run, and cmd. Explore multi-stage builds, base images, and digest references from Docker Hub or private registries.
Explore the RUN command in Dockerfiles, its shell and JSON array forms, how it runs in intermediate containers, and how environment variables, PATH, and caching influence image builds and layering.
Modify image metadata with ENV, USER, and LABEL in Dockerfiles, manage environment variables and PATH, and run commands as different users, with runtime overrides via --env.
Explore how Dockerfile volume declarations create mount points like /data, /web, and /static to enable data persistence and binding with runtime port mappings via expose.
Master how ENTRYPOINT and CMD define a container's start-up command, how the exec and shell forms operate, and how overrides with docker run and signals shape behavior.
Explore parameterizing dockerfiles with arg and build-arg. Convert build-time args to envs for runtime configuration and label images to track base image and library variants.
Learn how to build custom Python images for dev and prod stages, using multi-stage dockerfiles to preinstall Cython and Flask components, shortening build time while preserving performance.
Master testing and debugging Python apps in containers by applying static tests with PyLint and unit tests with PyTest, then explore production image testing and debugging with PDB.
Containerize a Django development workflow by using a base image and Dockerfile, initialize project and applications, migrate sqlite3, and run the development server locally.
deploy a production-grade MariaDB database for the Django Pulse app by building a MariaDB container, configuring environment variables, performing migrations, and using a universal image with DJ database URL.
Explore automating multi-container Python applications—from building and wiring images, networks, and volumes to deploying with Docker Compose, Swarm, and Kubernetes—through scripted, repeatable workflows.
Ship container images efficiently by exporting, importing, saving, and loading tar archives, or using image registries like Docker Hub with push and pull for automated deployment.
Explore local registry technologies for container images, including Docker Registry, Harbor, and JFrog Artifactory, with caching and pass-through proxies, and compare benefits for small teams vs DevOps.
Integrate GitHub with Docker Hub to automate image builds, webhooks, and deployment pipelines from source push to production in a cloud and local environment.
Explore how GitLab enables containerized Python projects with a multi-stage docker build, pytest tests, and image security scanning, all through a single ci/cd pipeline and integrated image registry.
Learn to scan container images for known vulnerabilities using CVE data, inspect image layers and tags, and use Claire to generate reports and guide fixes.
Deploy production containerized Python applications using Docker by mastering multi container deployments with Docker Compose and Swarm, and compare Docker’s development focus with Kubernetes’ operations focus.
Learn how docker compose simplifies deploying multi-container apps by wiring services, networks, and volumes, and how to bring up and down the app with initialization steps.
Learn how to declare version and volumes in a Docker Compose file using yaml, focusing on version 3.7, networks and external volumes, and sharing volumes across services.
Learn how Docker Compose shifts from imperative deployment to a declarative model, manage a three-service Django app (db, app, proxy), upgrade Postgres, and initialize migrations with the run subcommand.
Docker compose uses a declarative approach to describe the desired state and upgrades Postgres from 11.3 to 11.4, preserving data via volumes.
Discover Docker Swarm fundamentals for multi-host deployments, including manager and worker nodes, overlay networks, swarm services, global and replicated deployments, port publishing, and data replication for resilience.
Learn how to run standalone containers within a Docker Swarm, using overlay networks for cross-node communication, and understand image handling, publishing ports, and limitations on persistent volumes.
Deploy swarm services to manage containers across a cluster, defining replicas, placement, health checks, and update policies, while handling service endpoints and round-robin traffic.
Deploy a docker swarm stack for Django Pulse with Galera MariaDB cluster and Nginx proxy, enabling high availability, synchronous master-master replication, and automatic failover across multiple nodes.
Navigate Docker Swarm as a programmatic platform for running microservice components as containerized services. Discover how services, tasks, replicas, deployment modes, placement constraints, networks, and service endpoints enable scalable architectures.
Explore how Docker Swarm uses volumes for persistent data, and how health checks, configs, secrets, and global deployment patterns create resilient, initialized services.
Explore docker swarm lifecycle by updating stacks, deploying new service versions, and rolling back when needed, while configuring parallelism, delay, and monitor settings, and enforcing CPU and memory reservations.
Docker enables container image creation and registry delivery to ship Python applications from development to production, using runtime and orchestration tools, compose for deployments, and swarm stacks for scalable clusters.
Explore how Kubernetes orchestrates containerized Python applications, compare it with docker swarm, and deploy from a single-node mini cube to a multi-node cluster on Google Cloud.
Launch a minikube dashboard, deploy a Flask app with kubectl run, then expose it via a replica set, service, and ingress using yaml configurations.
Deploy a multi-container Django Pulse app on minikube, wiring components with postgres, nginx, and services through an ingress while using DNS, replica sets, and secrets for stable microservice communication.
Explore Kubernetes job and cronjob controllers, using a config map to initialize a Django app database, run migrations, and perform scheduled backups, with backoff and logging practices.
Learn how Kubernetes services provide stable interfaces to dynamic pods by using cluster IPs, DNS, and label selectors, including nodeport, headless, external name, and load balancer types.
Explore Kubernetes volumes, including emptyDir, hostPath, and persistent volumes, and learn how PVCs, storage classes, and access modes enable dynamic provisioning and data persistence.
Launch docker containers to isolate data science projects with images like scipy, numpy, and pandas. Access notebooks via jupyter images with bind mounts and port mappings while noting docker limitations.
Explore building a custom Jupyter image with pandas and plotly to analyze world development indicators via the World Bank RESTful API, using docker and docker compose.
Package a trained classification model into a container and deploy a self-contained microservice that serves predictions via a REST API using a TensorFlow Serving image and Docker Swarm.
Explore running GPU-accelerated machine learning in containers with Docker and Nvidia container toolkit, enabling GPU access for Linux-based TensorFlow workflows.
Important Disclaimer: This course requires you to download Anaconda software from anaconda[.]com website, as well as Docker software from docker[.]com website. If you are a Udemy Business user, please check with your employer before downloading software.
Docker and Kubernetes are the Must-Have Skills for Python Enginner these days.
Whether your focus is in Machine Learning & Data Science, or you use Python as General Programming Language, you must understand Docker & Kubernetes. Both form a basis of Modern Cloud Native Applications built in Microservices Architecture.
Quotes from selected course reviews:
"It covers pretty much everything you'd expect from enterprise project" Abbi1680
"This course is absolute gold for data science and machine learning people because all Docker and Kubernetes courses out there focus on nothing but web applications. Thanks to the instructor for handling the concept of virtualization from a much needed different perspective. There are a lot of sources for learning ML and DS but skills taught in this course are what will make you stand out from the crowd." Mertkan Alacahan
"Spot on. Great depth yet very concise." Toby Patterson
"This is a deep deep deep dive in Docker with python. It is the complete course. Thanks for putting this together it is more than enough for what a need. I think watching the basic lectures and some selected topics I get what I needed and this became my docker reference guide if I need to solve a specific scenario. Thanks for putting this together. Highly recommend the course if you are a python developer." Pedro
In this Course you learn how to:
Develop and Explore Machine Learning & Data Science Jupyter Notebooks in Docker
Run Machine Learning Models in Production with Kubernetes and Docker Swarm
package your Python Code into Containers
publish your Containers in Image Registries
deploy Containers in Production
build highly modular Container-based Services in Micro-Services fashion
monitor and maintain Containerized Apps
You are going to become fluent and confident in using Docker Tools to create top-class Containers running your Python Code. You master Docker Runtime Tools like Compose and Swarm to run them. The Course also gives you sound knowledge and deep understanding of Kubernetes as the Application Platform. You gain confidence in Designing your Application to run on Kubernetes, as well as get deep knowledge of writing Kubernetes Object Declarations.
The Course is full of practical Exercises. There are over 40 GitHub Repositories full of Code Samples for the Course.
You can use the Course in two ways:
If you use Python for Machine Learning & Data Science, go Top-Down: start with Section 7 to quickly gain practical Docker skills and use Sections 2 to 6 to dig deeper into specific Container Topics.
If you want to use Python for Web Apps & Microservices, try Bottom-Up: use the Course in linear manner.
Start building Containers today!