
Clone the repository from GitHub, switch between the starting and ending branches to compare code, and import the Maven project into IntelliJ.
Create and use a Docker cheat sheet as a memory aid, download the PDF reference, print it, and keep it handy for quick command lookups.
In this lecture I describe what Docker is, why Docker is important, and why you want to use Docker if you are a Java developer.
Docker Editions are a fairly new addition to Docker. In this lecture I explain what the different Editions of Docker are, and the new version numbering for Docker Releases.
The student needs to install Docker on their operating system to follow along with the course examples.
In this lecture we step through the classic "hello world" example using Docker. This verifies the student has correctly configured their Docker environment.
Docker Hub is a public repository for Docker images.
Kitematic is a GUI tool for working with your Docker environment. In this lecture I give you an overview of Docker's kitematic tool. (This tool is optional for the course)
Set up a web container, map ports, and verify a hello world Nginx page on localhost using KiteMatic to practice container running for docker fundamentals.
Learn to run MongoDB and MySQL in Docker containers, expose ports, and allocate storage to enable network communication for Java applications.
Stand up a mongo database in a docker container, pull the image from docker hub, run with port mapping, verify it runs, and explore ephemeral development benefits.
Download the Spring Boot project from GitHub, run it with Maven, and connect to a local Docker Mongo database to see the default Spring Boot Mongo integration at port 8080.
Review assignment by walking through a Spring Boot MongoDB example in Docker, running via Maven, debugging with Docker logs, and performing basic CRUD operations in a local MongoDB instance.
Explore how Docker images define containers, emphasizing immutability, image layers, and SHA-256 hashes that form image IDs, with tag semantics across registries.
Explore docker files by examining the mongo image, understanding how dockerfile recipes create image layers, and how inherited debian base images share layers across containers.
Map a host directory to your container to create persistent Mongo data storage, using docker run with -v and port mapping, then restart to verify data persistence.
Stand up a rabbitmq instance using docker and enable the management console with the rabbitmq management tag, exposing ports 15671, 15672, 5671, and 5672, and map localhost 8080 to 15672.
Learn to run a MySQL container with Docker by configuring environment variables, mapping ports (3306), and persisting storage for development, including a null root password.
Set up a MySQL 5.7 docker image, configure environment variables to enable an empty root password, and map a local volume to persist data. Connect on localhost, port 3306.
Learn docker housekeeping to control disk usage by cleaning containers, images, and volumes, including killing running containers, removing stopped ones, and removing dangling images and volumes.
Use flash cards to reinforce docker concepts for java developers, helping learners master docker practices for java development.
Learn to pull Docker images, map ports, set environment variables, and attach storage while working with containers and popular databases like MySQL, Mongo databases and RabbitMQ.
Select a CentOS base image and install Java to create a ready-to-run container. Demonstrate using Docker run, exec, and Dockerfile steps to build a reusable Java-ready image.
Explore a Spring Boot executable jar running on embedded Tomcat with an in-memory H2 database. Learn to build and deploy its containerized artifact in Docker for Java development.
Explore how James Labocki of Red Hat explains enterprise use of Docker containers, OpenShift as a Kubernetes-based platform, and how Java developers leverage Fabric8, Maven plugins, and Ansible automation.
Conclude with hands-on exploration of Docker and Spring Boot images, including creating a Dockerfile and building a Spring Boot image, and learn to automate image building for repeatable enterprise processes.
Automate building Docker images with your build tools, push them to a repository like Docker Hub, and align with DevOps workflows, treating images like jar files in the enterprise.
Compare Maven and Gradle and use Fabric8 docker plugin for Maven to build and publish docker images to an artifactory repository, highlighting Maven's dominance and Gradle's rising popularity.
Learn to install and configure the Fabric8 Maven plugin to build Docker images from Maven, including Docker host setup, artifact copying, and tagging with latest and the project version.
Configure the Fabric 8 plug-in and build a Docker image from a Dockerfile by running mvn clean package followed by mvn docker:build, while tagging with latest and project version.
Simulate a Maven release by incrementing the release version in the POM and building the Docker image, then analyze the error and await the next module for the solution.
Review a Docker-based release workflow for a Java project, fix a hard-coded version in the Dockerfile, build and tag images 0.2 and latest, and automate releases with a templated Dockerfile.
Flash cards help Java developers study Docker concepts, reinforcing quick recall and practical understanding as a learning tool for this course.
Conclude the module by showing how the Fabric 8 plugin automates Docker image creation for a Spring Boot executable jar with a dynamic Dockerfile that adapts to Maven artifact names.
Start running docker containers from Maven using the Fabric8 plugin to enable integration testing between a Spring Boot application and MySQL, with port mappings, environment variables, and mounted volumes.
Run a Docker image from Maven using the Fabric8 plugin to start and stop containers, map port 8080 to localhost, and support integration tests.
Discover how a multi-container Spring Boot app uses RabbitMQ to pass a page view event from a client to a service, which parses XML and stores it in MySQL.
Link containers to enable communication between the Spring Boot app, RabbitMQ, and MySQL, using Docker networking and environment overrides to point to host names such as MySQL DB and RabbitMQ.
Orchestrate four Docker containers with the Fabric 8 plugin and Maven. Configure readiness checks, health endpoints, and inter-container dependencies (MySQL, RabbitMQ, page view service) to run the app.
Configure integration tests with docker containers for a repeatable continuous integration workflow. Use fabric8 and maven failsafe to start containers before verification, run tests, then shut them down.
Review the assignment code to emit a page view event via the page view service and configure Docker Hub publishing with the Fabric8 plugin, Maven settings, and image naming.
Use flash cards to reinforce essential Docker concepts for Java developers, aligning study with practical Docker workflows and Java integration practices.
Explore how docker and the fabric8 plugin streamline local development with self-contained containers, enabling integration tests, CI-friendly workflows, and faster software delivery.
Learn how Docker Compose coordinates multiple containers using YAML to describe and deploy a four-container application, enabling portable environments and QA testing deployments across environments.
Learn YAML basics for Docker Compose and Spring configuration, including comments, key-value pairs, strings, nesting, lists, and maps, with proper indentation and editor choices.
Learn to run WordPress with Docker Compose by deploying WordPress and MySQL in separate containers, using a Docker Compose YAML file, environment variables, and port mapping from 8000 to 80.
Learn to run a three-service backend with Docker Compose by bringing up MySQL DB, RabbitMQ, and the page view service, including environment setup, health checks, and restart policies.
Set up the fourth image for the Spring Boot Docker app using the Docker Compose YAML, push images to Docker Hub, and observe health checks and race conditions.
Add the spring boot actuator starter to enable a health endpoint for production monitoring and configure docker compose to check that endpoint with a 200 status.
Learn how Docker Compose streamlines dev and test environments with containers, handling QA and end-to-end testing, while noting production limits and orchestration with Kubernetes or OpenShift.
Explore Docker Swarm and its architecture, learning how to provision containers across multiple servers and orchestrate services for production, high availability, and self-healing.
Explore Docker Swarm mode, Docker's container orchestration solution for running and scaling containers across multiple nodes, with stacks and secrets to manage deployments and credentials.
Initialize a Docker swarm to create a manager node, generate join tokens, and establish a Raft-backed, encrypted PKI with certificates, while exploring nodes, services, and Portainer.
Explore Docker Swarm topology by examining managers and workers, load balancing across nodes, and secure, self-healing multi-node deployments with Raft and certificates.
Provision four CentOS servers on Digital Ocean to form a multi-node Docker Swarm, configure SSH keys, and assign four public IPs, preparing for Docker installation in a future module.
Accept the optional challenge to install Docker on four swarm servers using the CentOS guide linked in the course resources.
Initialize a four-node docker swarm with nodes 1 and 3 as managers and nodes 2 and 4 as workers, using public IP addresses, to enable failover and self-healing.
Install Portainer as a service on a manager node to run the swarm Portainer, then access it via the public IP on port 80 to log in.
Install Portainer on a Docker Swarm, map port 80, and troubleshoot quorum issues by maintaining an odd number of manager nodes, with hands-on debugging insights.
Explore how Docker Swarm service discovery routes requests across nodes, enabling seamless load balancing and auto-routing to the active container, even as services scale.
Docker swarm routing mesh uses IPVS to route traffic to a service's virtual IP, load balancing across swarm nodes, with traffic published on ports and no session stickiness by default.
Explore how Docker Swarm enables scaling to cloud-scale services by managing hundreds of nodes and containers, with stateless rest services, automatic recovery, and service discovery.
Learn to use docker overlay networks to enable inter-node container communication in a swarm, create and attach a guru service network, and route by service name for reliable multi-node deployment.
Deploy a complete application inside Docker Swarm using a Docker Compose file with deployment data, and let Swarm manage replicas, networks, and health checks via docker stack deploy.
Learn how Docker secrets in Docker Swarm protect sensitive data by mounting as files under /run/secrets, with access control and encryption in raft stores up to 500 kilobytes.
Implement docker secrets to protect the MySQL password and wire it into a Spring Boot app using Docker Compose and swarm secrets.
Conclude by showing how to lift a Docker Compose file from local development to a Swarm cluster, deploying services and secrets, and scaling across a cluster of servers.
Learn the GitHub workflow by forking and cloning the repository, using lesson-by-lesson branches, and comparing your work with mine.
If you're a Java developer, Docker is a true game changer for you!
Developing Java applications in large enterprises is no easy task. Every day you are asked to work with many different technologies. In the morning, you might need to save data to a MySQL database. In the afternoon, you might be working with RabbitMQ. Tomorrow you might be asked to work with Mongo or Redis.
Think about what you need to do when working with all these different technologies.
If you install all these on your laptop, it becomes cluttered and slow. Sure, you could use VMs to run these - if you really want to slow down your laptop. Virtual Machines are awesome, but VMs can also be huge resource hogs.
If you're on a dev team, you can set up dedicated development servers. But then you don't have a clean development environment. And your development work becomes dependent on access to the development servers.
Docker is an exciting technology you can leverage for enterprise development.
The popularity of Docker has been explosive. Much of the industry focus has been on DevOps. But more so on the Operations part.
Did you know Google creates roughly 285 MILLION Docker containers per day?
Docker is clearly a popular technology for running cloud scale applications like GMail.
But as a Java developer, what does Docker mean to you?
Are you working with MySQL? There's a ready made Docker image for you.
Postgres? Mongo DB? Redis? Cassandra? RabbitMQ? ActiveMQ? Kafka?
Yep, there's Docker images you can download and use today.
You can use Docker for a lot more than just your local development.
Are you developing microservices? If you are not already deploying your microservices in Docker containers, chances are you soon will be.
Introduction to Docker
This course starts off assuming you have no knowledge about Docker.
You will learn why Docker is not like a Virtual Machine.
Right away, you will learn how to run a Docker container with a Docker Image pulled down from Docker hub.
As the course progresses, you will learn how to create your own Docker images and publish those images to Docker hub.
Java DevOps with Docker
Through the use of the Fabric8 Maven plugin, you will learn how to automate many Docker tasks, such as creating images for microservices.
Docker Compose is a powerful tool to run multiple Docker containers. You will learn how to run how to run an application consisting of a Spring Boot web application, RabbitMQ, a page view microservice, and a MySQL database. Through Docker Compose, with a single command, you will be able to start or stop this application on any Docker machine!
Using Docker Swarm Mode
You'll learn how Docker Swarm Mode does container orchestration. In this course, you will provision your own Docker Swarm Cluster in the cloud. You will deploy a containerized Java application into a Docker Swarm Cluster. You'll see what a powerful feature Docker Swarm's routing mesh is, and how you can dynamically scale your application.
Expert Interviews
This course includes interviews with leading industry experts!
James Labocki - Product Owner, Red Hat Cloud Infrastructure
More on the way!
Slack Group
Exclusive to this course is a Slack group you can join to interact with the instructor, teachers assistants, and other students learning Docker from around the world. Say hi. Get help with a problem, or help someone else. When you enroll in this course you can join a community of others learning Docker!
Spring Boot Cookbook!
Course includes a Spring Boot Cookbook giving you example Spring Boot projects you can use against popular open source technologies including:
Mongo DB
MySQL
Postgres
Maria DB
DB2 Express
Neo4J
Redis
Cassandra
ActiveMQ
RabbitMQ