Docker Crash Course by Ranga Rao Khurana

Jul 11, 2024

Docker Crash Course by Ranga Rao Khurana

About the Instructor

  • Ranga Rao Khurana
  • 20+ years of application development experience
  • Proficient in Java, Python, JavaScript
  • Experienced with frameworks: Spring Boot, REST API frameworks, Angular, React, and Vue
  • AWS Certified Solution Architect
  • Expertise in containerizing microservices using Docker

Course Objective

  • Learn basics and fundamental commands of Docker
  • Understand Docker containers, images, repositories, and registries
  • Create Docker images for Spring Boot projects, including web applications, REST APIs, and full-stack applications
  • Run containers for microservices
  • Utilize Docker Compose for container management
  • Use Docker Hub effectively (MySQL, Redis, RabbitMQ, etc.)

Prerequisites

  • Basic Java programming knowledge
  • Some experience with Spring and Spring Boot
  • Knowledge of JavaScript and React (helpful but not necessary)

Course Resources

  • GitHub repository for source code and step-by-step details: github.com/in28minutes/docker-crash-course
  • Installation guides and troubleshooting instructions

Course Structure

Phase 1: Basic Understanding and Setup

  1. Installation Guide

    • Install Java (versions > Java 8)
    • Install Eclipse (latest version)
  2. Docker Installation

    • Install Docker Desktop on MacOS or Windows (very simple process)
    • Install Docker on Linux (more complex, follow specific instructions on Docker’s website)
  3. Basic Docker Commands

    • Verify Docker installation using docker --version
    • docker run command overview: running containers
    • Example setup: running a Spring Boot REST API container
    • Publishing container ports to host ports

Phase 2: Hands-on with Docker

  1. Running Containers

    • Pausing and unpausing containers
    • Inspecting containers
    • Pruning stopped containers
    • Difference between stopping and killing containers
    • Setting and utilizing restart policies for containers
  2. Working with Docker Images

    • Understanding tagging: docker tag
    • Pulling images from Docker Hub: docker pull
    • Searching for images: docker search
    • Inspecting image history and details: docker image history, docker image inspect
    • Removing local images: docker image remove

Phase 3: Real-World Applications and Docker Compose

  1. Containerizing Applications

    • Starting with simple REST APIs and progressively move to more complex applications
    • Full-stack applications: React frontend communicating with Spring Boot backend
  2. Microservices and Docker Compose

    • Set up and run multiple microservices
    • Use docker-compose to manage multi-container applications

Phase 4: Advanced Concepts and Cloud Deployment

  1. Docker in Cloud Environments
    • Understanding Docker's popularity and ease of use locally and on cloud platforms
    • Deploying Docker containers to cloud providers
    • Introduction to services like Azure Container Service and AWS Elastic Container Service (ECS)

Practical Exercises

  • Hands-on practices for confirming understanding of each module
  • Deploying sample applications to different environments using Docker

Tools and References

  • Use GitHub repository for all source codes
  • Utilize Docker Hub for official images
  • Eclipse for project management and development

Final Notes

  • Keep practicing the Docker commands to gain confidence
  • Make sure to handle dependencies using the pom.xml in your Maven projects
  • Refer to provided resources for troubleshooting and additional knowledge

Key Takeaways

  • Docker simplifies deployment and consistency across environments
  • Containers are lightweight compared to traditional virtual machines
  • Images contain all dependencies needed for applications
  • Docker Compose facilitates multi-container applications management

Additional Resources

  • Troubleshooting guides and playlists available within the course resources
  • Stay updated with Docker and cloud service updates to leverage new features