[TP] Creating My First Container


We are going to deploy a Docker container.

What you will learn in this TP :

Prerequisites

You must have a machine with Docker installed.

Deployment

In this section, we will deploy our first Docker container.
  1. Find and Download the Image
    We will deploy an Apache web server version 2.4.62. We must find a ready-to-use image and download it.
  2. Deploy the Container
    You need to deploy our first container with the following characteristics:
    • Image: apache version 2.4.62
    • Port exposure: 83
    • Container name: my-first-container
  3. Check Container Status
    You must check that your container is functioning properly. To do this, provide the docker commands for the following actions:
    • Show running containers
    • Show running and stopped containers
    • Show only the my-first-container container
    • Show containers that have the Label AUTHOR:ROUSSELTM
  4. Container Verification
    You must find the command to test the proper functioning of the web server container.
    WARNING: A running container is not necessarily a functioning container. You must check its logs and outputs.

Optimization

In this section, we will optimize our first Docker container.
  1. Build a second, lighter container
    As mentioned during the courses, official images must be used in priority, especially the most optimal ones. You must choose another, more size-optimized image.
  2. Compare the disk usage of the two containers
    You must find a command that shows only the two containers with their disk usage, knowing that both image names contain 'my-'

Difficulty level: (2/5)

Course Glossary

DevOps

A culture, movement, and set of practices designed to unify software development (Dev) and IT operations (Ops).

API Gateway

A gateway that acts as a single entry point for all requests to a microservices architecture. It handles routing, security, and rate limiting.

Architecture

The overall structural design of an IT system, defining its various components, their relationships, and the principles guiding its evolution.

Artifact

The final outcome of a software compilation or build process, such as a .jar file, a zip archive, or a Docker image, ready for deployment.

Repository

A centralized storage location. This can refer to a source code repository (e.g., Git) or an artifact and binary repository (e.g., Harbor, Nexus, Arti...

Docker

An open-source platform designed to make it easier to create, deploy, and run applications by isolating them into portable, lightweight software conta...