Toggle Menu

Running a Cassandra Application in Docker

Docker is the dominant container runtime used in enterprises today. In this module we will look at how to deploy a cloud-native application in Docker containers. While Docker is powerful, managing individual containers can be difficult at scale.

Kubernetes simplifies deployment, management and scalability of containers. Kubernetes is the leading container orchestration technology used in enterprises today. Understanding containers is a prerequisite to learning Kubernetes. In this module we will learn how to use Docker containers to deploy an application consisting of an Apache Cassandra™ cluster, a Spring Boot service and an Angular web application with an nginx server.

Get Started
Docker Overview

Docker Overview

Docker images combine an application and the environment necessary for it to run. Dockerfiles define how images are built. Images run in containers and containers communicate using Docker networks.

Next: Docker Images

Docker Images

Docker images are read only files that combine an application and the environment necessary for it to run. The environment includes the libraries, dependencies, tools, and files. Images are the templates from which Docker containers are instantiated. Images are typically stored in public or private repositories so they can be used to consistently create and recreate Docker containers. Use the build command from the Docker command line interface (CLI) to build an image from a Dockerfile.

Next: Dockerfiles
Docker Images


A Dockerfile is a text file that defines all of the steps necessary to create a docker image.

Most Dockerfiles begin by referencing a parent image. Typical parent images define core tools like nginx, openjdk or nodeJS. Using layering you can define a Dockerfile with a parent image that has another parent image.

A Dockerfile may define the commands necessary to build an application, and the environment variables it needs to run. It may also download and install software and run the scripts necessary to build it.

Next: Docker Containers

Docker Containers

A Docker container is a virtual environment for running an application (packaged as Docker image) while isolating it from the host environment. Containers use operating system services directly from the host environment. Since they don’t contain a complete OS, containers are smaller than virtual machines and boot up very quickly.

Containers may make network endpoints available in the host network.

In a cloud-native application, components deployed in containers can be quickly instantiated or shut down to support elasticity.

Next: Docker Networks
Docker Containers
Docker Networks

Docker Networks

Applications running in Docker containers need to communicate with other applications. These other applications may be running in Docker containers or directly on a host OS. Docker networking creates an OS-agnostic network framework for containers.

Docker networks allow containers to communicate with one another while remaining isolated from the host network.

Next: Docker Compose

Docker Compose

Docker Compose is a tool to manage applications consisting of multiple Docker containers. Users create a single docker-compose.yaml file to configure multiple containers, networking and more.

Next: Skill Building
Docker Compose

Skill Building

Are you ready to try it out? Deploy a Cassandra-based application in Docker in this hands on learning exercise.

Running Cassandra in Docker

Learn to deploy a Cassandra Docker app


Docker is a containerization platform that packages applications and their dependencies together so that they can be easily deployed across multiple environments.

How are containers different from virtual machines?

In this scenario we will deploy a Web application, a Microserrvice and a Cassandra cluster in Docker.

We will:

  • Create a Docker network
  • Pull the images from Docker Hub
  • Deploy the Cassandra cluster
  • Deploy the Microservice
  • Test the Microservice to database connection
  • Deploy the Web application
  • Test the Web application
  • Shut down the containers
  • Re-create the application using Docker compose

Let's get started!

Time to Complete

15 minutes




Do you have a suggestion or issue you’ve discovered?

Share Feedback

More Resources

Items related to Docker

Docker Overview

Docker Overview

Docker is an open platform for developing, shipping, and running applications.

Read the Docs
Docker Compose

Docker Compose

Build a simple Python web application running on Docker Compose.

Read the Docs
Docker Commands

Docker Commands

Docker command line reference.

REad the Docs