Docker Virtualization Project

Introduction

This project aims to enhance your system administration skills by utilizing Docker to set up a virtualized environment. You will create several Docker images and configure them in a personal virtual machine.

General Guidelines

  • Virtual Machine: Complete the project within a Virtual Machine.
  • Source Files: Place all configuration files in the srcs folder.
  • Makefile: Create a Makefile at the root directory to build Docker images using docker-compose.yml.
  • Documentation: Familiarize yourself with Docker and related technologies through available documentation.

Mandatory Part

Infrastructure Setup:

  • NGINX: Container with TLSv1.2 or TLSv1.3 only.
  • WordPress + PHP-FPM: Container with WordPress and PHP-FPM installed and configured.
  • MariaDB: Container with MariaDB only. ### Volumes:
  • Volume for WordPress database.
  • Volume for WordPress website files.
  • Docker Network: Create a network to connect your containers.
  • Restart Policy: Ensure containers restart on crash.

Restrictions:

  • No host network, --link, or links: Use a dedicated network defined in docker-compose.yml.
  • No Infinite Loops: Avoid commands like tail -f, sleep infinity, or while true.
  • No Latest Tag: Do not use the latest tag for Docker images.
  • No Passwords in Dockerfiles: Use environment variables for configuration.

Configuration:

  • WordPress: Create two users in the database; avoid using usernames like admin or administrator.
  • Volumes Path: Available in /home/login/data on the host machine.
  • Domain Configuration: Configure your domain to point to your local IP address (e.g., login.42.fr).

How to Run the Project

  • Clone the Repository:
git clone git@github.com:ADILRAQ/Inception-42-cursus.git
cd Inception-42-cursus
  • Configure Environment Variables:

Edit the .env file in the srcs directory to set up your environment variables. Build and Start Containers:

  • Run the following command to build Docker images and start the containers:
make
  • Access the Services:
  • Ensure your domain name is configured to point to your local IP address.
  • Access the services through your domain (e.g., https://login.42.fr).

Article

Representation

Docker Network representation

Built With

Share this project:

Updates