Chapter 1
1 min read

Introduction to Containers and Container Security

Exercises

In this chapter, each section had its own exercises. But here are some additional exercises relevant to the whole chapter:

In this chapter, each section had its own exercises. But here are some additional exercises relevant to the whole chapter:

  1. Create a project on GitHub that will contain a backend, a frontend, and some Docker files. The backend should be a simple REST API that returns a JSON object. The frontend should be a simple HTML page that displays the JSON object.
  2. Create a Dockerfile for the backend and the frontend. The frontend Dockerfile should use the nginx image as a base image. The backend Dockerfile depends on the language you choose, but you can run docker init and it will help you create a Dockerfile.
  3. Run both images locally. Then create a Docker network and run both images on the same network. The frontend should be able to access the backend, without exposing a port.
  4. Create a Docker Compose file that runs both images. The frontend should be able to access the backend, without exposing a port.
  5. Create a Helm chart for both backend and frontend. The Helm chart should be able to deploy both images to a Kubernetes cluster. The frontend should be able to access the backend, using the service name.