Let's learn Docker!
| Project | Inception |
|---|---|
| Locked | 2025-07-24 15:34 CET:+0100 |
| Closed | 2026-03-02 09:05 CET:+0100 |
| Grade | 125% (3⭐ outstanding) |
| Retries | 0 |
This project has been created as part of the 42 curriculum by ehosta.
Inception is a System Administration related exercise. It aims to broaden knowledge of SysAdmin by using Docker by virtualizing several Docker images, creating them in a new virtual machine.
- First, git clone the project:
git clone https://github.com/panda2742/42-Inception
cd 42-Inception- Then, generate secrets/env:
make secretsIt will generate automatically and securely required secrets and environment variables.
- Once the Installation steps are done, build and wait for the whole project to be built:
make all- Docker documentation
- Docker Compose documentation
- Go documentation
- Redis documentation
- Nginx documentation
- VSFTPD documentation
- Grafana documentation
- Prometheus documentation
- MariaDB documentation
- WordPress documentation
- Nuxt documentation
AI have been carefully used for some topics about this project:
- Review code and help resolving errors
- Generating some tests to check if everything is okay
- Explaining some related topics such as FTP protocol, health checks
.
├── DEV_DOC.md
├── doc
│ └── BONUS.md
├── guardian
│ ├── cmd
│ │ └── guardian
│ │ └── main.go
│ ├── go.mod
│ ├── go.sum
│ ├── guardian
│ ├── internal
│ │ ├── config
│ │ │ ├── config_parser.go
│ │ │ └── constants.go
│ │ ├── envvar
│ │ │ ├── envvar.go
│ │ │ ├── generate.go
│ │ │ ├── prepare.go
│ │ │ └── restrict.go
│ │ └── secrets
│ │ ├── generate.go
│ │ ├── prepare.go
│ │ ├── restrict.go
│ │ └── secrets.go
│ └── pkg
│ ├── output
│ │ ├── output.go
│ │ └── output_utils.go
│ └── utils
│ ├── pair.go
│ └── random.go
├── guardian_conf.toml
├── Makefile
├── README.md
├── scripts
│ ├── hospital.sh
│ └── reset-git.sh
├── srcs
│ ├── docker-compose.yaml
│ └── requirements
│ ├── bonus
│ │ ├── adminer
│ │ │ ├── Dockerfile
│ │ │ └── tools
│ │ │ └── init.sh
│ │ ├── ftp-server
│ │ │ ├── conf
│ │ │ │ └── vsftpd.conf
│ │ │ ├── Dockerfile
│ │ │ └── tools
│ │ │ └── init.sh
│ │ ├── gombling
│ │ │ ├── Dockerfile
│ │ │ ├── go.mod
│ │ │ ├── internal
│ │ │ │ ├── handler
│ │ │ │ │ └── game_handler.go
│ │ │ │ ├── model
│ │ │ │ │ └── game.go
│ │ │ │ └── service
│ │ │ │ └── game_service.go
│ │ │ ├── main.go
│ │ │ ├── static
│ │ │ │ └── css
│ │ │ │ └── style.css
│ │ │ ├── templates
│ │ │ │ └── index.html
│ │ │ └── tools
│ │ │ └── init.sh
│ │ ├── grafana
│ │ │ ├── conf
│ │ │ │ └── grafana.ini
│ │ │ ├── Dockerfile
│ │ │ ├── provisioning
│ │ │ │ ├── dashboards
│ │ │ │ │ ├── dashboards
│ │ │ │ │ │ └── overview.json
│ │ │ │ │ └── dashboards.yml
│ │ │ │ ├── datasources
│ │ │ │ │ └── prometheus.yml
│ │ │ │ └── orgs
│ │ │ │ └── org.yaml
│ │ │ └── tools
│ │ │ └── init.sh
│ │ ├── prometheus
│ │ │ ├── conf
│ │ │ │ └── prometheus.yml
│ │ │ ├── Dockerfile
│ │ │ └── Dockerfile.old
│ │ ├── redis
│ │ │ ├── conf
│ │ │ │ └── redis.conf
│ │ │ ├── Dockerfile
│ │ │ └── tools
│ │ │ └── init.sh
│ │ └── wondercat
│ │ ├── app
│ │ │ ├── app.vue
│ │ │ └── pages
│ │ │ └── index.vue
│ │ ├── Dockerfile
│ │ ├── nuxt.config.ts
│ │ ├── package.json
│ │ ├── package-lock.json
│ │ ├── public
│ │ │ ├── favicon.ico
│ │ │ ├── favicon.png
│ │ │ ├── favicon.svg
│ │ │ └── robots.txt
│ │ ├── README.md
│ │ ├── tools
│ │ │ └── init.sh
│ │ └── tsconfig.json
│ ├── exporters
│ │ ├── mariadb-exporter
│ │ │ ├── Dockerfile
│ │ │ ├── src
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── mariadb_exporter.go
│ │ │ └── tools
│ │ │ └── init.sh
│ │ ├── nginx-exporter
│ │ │ ├── Dockerfile
│ │ │ └── src
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── nginx_exporter.go
│ │ ├── phpfpm-exporter
│ │ │ ├── Dockerfile
│ │ │ └── src
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── phpfpm_exporter.go
│ │ └── redis-exporter
│ │ ├── Dockerfile
│ │ └── src
│ │ ├── go.mod
│ │ ├── go.sum
│ │ └── redis_exporter.go
│ ├── mariadb
│ │ ├── Dockerfile
│ │ └── tools
│ │ ├── healthcheck.sh
│ │ └── init.sh
│ ├── nginx
│ │ ├── conf
│ │ │ └── inception.conf
│ │ ├── Dockerfile
│ │ └── tools
│ │ └── init.sh
│ └── wordpress
│ ├── conf
│ │ └── wp-config.php
│ ├── Dockerfile
│ └── tools
│ └── init.sh
└── USER_DOC.md
Every sources for the project is in the srcs/ directory. Guardian is a secret related project, explained in evaluation.
-
WordPress : a simple CMS.
-
MariaDB : the database associated with WordPress.
-
Nginx : the webserver that serves pages of the project, such as WordPress.
-
[Bonus] Adminer: an equivalent to PhpMyAdmin but uglier.
-
[Bonus] Vsftpd: a simple FTP server.
-
[Bonus] Gombling: you wouldn't know, but you would surely try.
-
[Bonus] Grafana: an advanced monitoring service to inspect exporters data.
-
[Bonus] Prometheus: a datasource from exporters to Grafana. Exports metrics.
-
[Bonus] Redis: a caching system for WordPress.
-
[Bonus] Wondercat: an amazing cat images generator.
Docker packages applications with their dependencies into portable containers, ensuring consistent behavior across different environments and simplifying deployment.
Go offers fast compilation, built-in concurrency, a single binary deployment, and excellent performance for building scalable services and cloud-native applications.
VMs virtualize entire operating systems (heavy, slow startup), while Docker containers share the host OS kernel (lightweight, fast startup, more efficient).
Secrets are encrypted, access-controlled, and designed for sensitive data like passwords, while environment variables are plaintext and better suited for non-sensitive configuration.
Docker networks provide container isolation and custom networking, while host network mode gives containers direct access to the host's network stack (faster but less isolated).
Volumes are managed by Docker, persist independently, and work across platforms, while bind mounts directly link host directories (simpler but less portable).