Skip to content

iliassovic2003/Inception-Containerization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Project Documentation

This documentation provides a comprehensive understanding of the project, demonstrating the application of containerization concepts, created by izahr.


πŸ“¦ What Is Docker?

"Docker is an open platform for developing, shipping, and running applications, which enables you to separate your applications from your infrastructure so you can deliver software quickly..."ΒΉ

Containers are the core aspect of this technology. Rather than using a virtual machine with a complete OS installationβ€”which can lead to resource exhaustion and time consumptionβ€”containers already use the kernel of the host machine and only require the necessary dependencies and libraries to function.


✨ Benefits

πŸš€ Portability

No more "it works on my machine" problems. Docker containers run consistently across different environments.

⚑ Efficiency

  • Lower Resource Usage: Containers share the host OS kernel
  • Faster Startup: Boot in seconds instead of minutes
  • Lightweight: Significantly smaller footprint than VMs

πŸ›‘οΈ Isolation

Docker uses advanced techniques to isolate containers, even when they share the same memory space. Through kernel namespaces:

"...Namespaces provide the first and most straightforward form of isolation. Processes running within a container cannot see, and even less affect, processes running in another container, or in the host system..."Β²

πŸ“ˆ Scalability

Perfect for microservices architecture, where a failing service doesn't compromise the entire application.


πŸ“ Dockerfile

"...A Dockerfile is a text file containing instructions for building your source code..."Β³

It provides automation to create a Docker Imageβ€”a layered product designed to set up and ensure the service works correctly within the container.


🎼 Docker Compose

In simple terms, Docker Compose is responsible for the communication and management of multiple Docker containers. It implements:

  • Networking: Creates networks for inter-container communication
  • Volumes: Persistent data storage
  • Service orchestration: Manages service dependencies and startup order

🌐 Docker Network

Allows container networking. Since containers are isolated in memory, a network is needed for communication using defined ports.

Why Custom Bridge Network?

  • DNS Resolution: Containers can reach each other by name
  • Isolation: Separated from default bridge network
  • Security: No direct host network access
  • Control: Custom subnet and gateway configuration

Docker Network vs Host Network

Network Mode Description Use Case Isolation
Bridge (default) Isolated internal network with NAT Default for containers βœ… Full
Host Shares host's network stack Performance-critical apps ❌ None
Custom Bridge User-defined isolated network Multi-container apps βœ… Full
None No networking Completely isolated tasks βœ… Maximum

πŸ’Ύ Docker Volume

"Volumes are persistent data stores for containers, created and managed by Docker..."⁴

Volumes provide a means to preserve data from being erased, ranging from user uploads to themes and preferences. Multiple implementation options are available for data storage.

Docker Volumes vs Bind Mounts

Feature Docker Volumes Bind Mounts
Management Managed by Docker Direct host path
Location /var/lib/docker/volumes/ Anywhere on host
Portability High (Docker handles paths) Low (hardcoded paths)
Performance Optimized Depends on host FS
Backup Easy with Docker tools Manual process
Security Docker-controlled permissions Host filesystem permissions

πŸ”’ Security

Despite container isolation, there are multiple potential security vulnerabilities, ranging from HTTP protocol penetration to password leakage through environment variables.

Password Security

Docker implements Docker Secrets, which requires passwords to be stored in a single file, then provided to the /run/secrets/ directory with maximum security, instead of being in an environment file that gets served to each container.

Feature Docker Secrets Environment Variables
Security Encrypted at rest and in transit Visible in docker inspect
Storage In-memory tmpfs only Stored in container config
Visibility Only to authorized services Visible to all processes
Best For Passwords, API keys, certificates Configuration, non-sensitive data
Example Database passwords Domain names, ports

HTTPS Protocol

Since NGINX is the web server responsible for HTTPS requests, and given the history of cyber threats, TLS (Transport Layer Security) was developed to secure communications.

TLS Version Year Status Key Features Security Browser Support Deprecated
SSL 3.0 1996 ❌ DEAD First widely used, flawed design ❌ Broken None YES (2015)
TLS 1.0 1999 ❌ DEPRECATED SSL 3.0 upgrade, RC4, MD5 hash ❌ Vulnerable Disabled by default YES (2021)
TLS 1.1 2006 ❌ DEPRECATED Protection against CBC attacks ⚠️ Weak Disabled by default YES (2021)
TLS 1.2 2008 βœ… SECURE AEAD ciphers, SHA-256, GCM mode βœ… Strong 99.9% NO
TLS 1.3 2018 βœ… RECOMMENDED 0-RTT, modern ciphers only, forward secrecy βœ… Strongest 98%+ NO

πŸ—οΈ Docker Engine Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                            HOST SYSTEM                                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        IPC/TCP        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚   Docker CLI     │◀─────────────────────▢│    Docker Daemon        β”‚ β”‚
β”‚  β”‚   (Client)       β”‚      (JSON/REST)      β”‚    (Server - dockerd)   β”‚ β”‚
β”‚  β”‚                  β”‚                       β”‚                         β”‚ β”‚
β”‚  β”‚  β€’ Go binary     β”‚                       β”‚  β€’ Persistent process   β”‚ β”‚
β”‚  β”‚  β€’ Commands:     β”‚                       β”‚  β€’ Manages:             β”‚ β”‚
β”‚  β”‚     docker run   β”‚                       β”‚    - Containers         β”‚ β”‚
β”‚  β”‚     docker ps    β”‚                       β”‚    - Images             β”‚ β”‚
β”‚  β”‚     docker build β”‚                       β”‚    - Networks           β”‚ β”‚
β”‚  β”‚                  β”‚                       β”‚    - Volumes            β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚           β”‚                                            β”‚                β”‚
β”‚           β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                β”‚
β”‚           β”‚  β”‚                                                          β”‚
β”‚           β–Ό  β–Ό                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                                                    β”‚
β”‚  β”‚ Communication   β”‚                                                    β”‚
β”‚  β”‚  Channel:       β”‚                                                    β”‚
β”‚  β”‚                 β”‚                                                    β”‚
β”‚  β”‚  Option 1:      β”‚          Option 2:                                 β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                              β”‚
β”‚  β”‚  β”‚ Unix     β”‚   β”‚          β”‚ TCP      β”‚                              β”‚
β”‚  β”‚  β”‚ Socket   β”‚   β”‚          β”‚ Socket   β”‚                              β”‚
β”‚  β”‚  β”‚ /var/run/β”‚   β”‚          β”‚ 0.0.0.0: β”‚                              β”‚
β”‚  β”‚  β”‚ docker.  β”‚   β”‚          β”‚ 2375     β”‚                              β”‚
β”‚  β”‚  β”‚ sock     β”‚   β”‚          β”‚          β”‚                              β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                              β”‚
β”‚  β”‚                 β”‚                                                    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                                    β”‚
β”‚                                                                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Docker CLI

The Docker CLI (Command-Line Interface) is where users interact with Docker using commands to start and stop services, inspect volumes, debug, and more. It communicates with the Docker Daemon using either a UNIX socket or a TCP connection.

  • Written in Go
  • Sends commands via JSON/REST API
  • Primary interface for Docker operations

Key features:

  • Written in Go
  • Sends commands via JSON/REST API
  • Primary interface for Docker operations

Docker Daemon

The Docker Daemon (dockerd) is the persistent background service that:

  • Listens for Docker API requests
  • Manages Docker objects (containers, images, networks, volumes)
  • Handles container lifecycle
  • Communicates with container runtime (containerd)

Communication methods:

  • Unix Socket (/var/run/docker.sock): Default, local-only access
  • TCP Socket (port 2375/2376): Remote access (requires proper security)

Container Creation Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    USER EXECUTES COMMAND                                β”‚
β”‚                    $ docker run nginx                                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         Docker CLI                                      β”‚
β”‚                                                                         β”‚
β”‚  β€’ Parses command                                                       β”‚
β”‚  β€’ Sends API request to daemon                                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Docker Daemon (dockerd)                            β”‚
β”‚                                                                         β”‚
β”‚  1. Pulls image if not present                                          β”‚
β”‚  2. Creates container configuration                                     β”‚
β”‚  3. Sets up networking                                                  β”‚
β”‚  4. Prepares volumes                                                    β”‚
β”‚  5. Calls containerd                                                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       containerd                                        β”‚
β”‚                   (Container Supervisor)                                β”‚
β”‚                                                                         β”‚
β”‚  β€’ Manages container lifecycle                                          β”‚
β”‚  β€’ Handles image transfer from daemon                                   β”‚
β”‚  β€’ Supervises runc                                                      β”‚
β”‚  β€’ Manages container snapshots                                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       containerd-shim                                   β”‚
β”‚                                                                         β”‚
β”‚  β€’ Keeps container running if containerd restarts                       β”‚
β”‚  β€’ Reports exit status                                                  β”‚
β”‚  β€’ Manages STDIO streams                                                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           runc                                          β”‚
β”‚                    (OCI Runtime)                                        β”‚
β”‚                                                                         β”‚
β”‚  1. Creates namespaces                                                  β”‚
β”‚  2. Sets up cgroups (resource limits)                                   β”‚
β”‚  3. Configures root filesystem (overlay/bind mounts)                    β”‚
β”‚  4. Applies security profiles (AppArmor/SELinux)                        β”‚
β”‚  5. Executes container process                                          β”‚
β”‚  6. Exits (shim takes over)                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    RUNNING CONTAINER                                    β”‚
β”‚                                                                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                          β”‚
β”‚  β”‚  Isolated Process with:                   β”‚                          β”‚
β”‚  β”‚  β€’ Own PID namespace                      β”‚                          β”‚
β”‚  β”‚  β€’ Own network stack                      β”‚                          β”‚
β”‚  β”‚  β€’ Own filesystem view                    β”‚                          β”‚
β”‚  β”‚  β€’ Resource limits (CPU, memory)          β”‚                          β”‚
β”‚  β”‚  β€’ Security constraints                   β”‚                          β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“‹ Service Overview

This infrastructure consists of the following services:

Core Services

  • NGINX - Secure web server (HTTPS only, TLSv1.2/1.3)
  • WordPress - Content management system with PHP-FPM
  • MariaDB - Database server for WordPress data
  • Redis - Cache service for improved performance

Bonus Services

  • FTP Server - File upload/download service
  • Adminer - Database management interface
  • Static Website - Custom landing page
  • cAdvisor - Container performance monitoring

πŸ”— Service Architecture & Communication Flow

                                    INTERNET
                                       β”‚
                                       β”‚ HTTPS (443)
                                       β”‚ TLS 1.2/1.3
                                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                              HOST SYSTEM                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚                      Docker Bridge Network                         β”‚  β”‚
β”‚  β”‚                        (inception-net)                             β”‚  β”‚
β”‚  β”‚                                                                    β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚  β”‚
β”‚  β”‚  β”‚                         NGINX                               β”‚   β”‚  β”‚
β”‚  β”‚  β”‚                    (Reverse Proxy)                          β”‚   β”‚  β”‚
β”‚  β”‚  β”‚                                                             β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β€’ Port 443 (HTTPS)                                         β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β€’ SSL/TLS Termination                                      β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β€’ Routes requests to backend services                      β”‚   β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚  β”‚
β”‚  β”‚                 β”‚                β”‚             β”‚                   β”‚  β”‚
β”‚  β”‚                 β”‚                β”‚             β”‚                   β”‚  β”‚
β”‚  β”‚      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚  β”‚
β”‚  β”‚      β”‚   WordPress     β”‚  β”‚   Adminer   β”‚  β”‚ Static Site   β”‚       β”‚  β”‚
β”‚  β”‚      β”‚   (PHP-FPM)     β”‚  β”‚             β”‚  β”‚               β”‚       β”‚  β”‚
β”‚  β”‚      β”‚                 β”‚  β”‚  Port 8080  β”‚  β”‚  Port 80      β”‚       β”‚  β”‚
β”‚  β”‚      β”‚  β€’ Port 9000    β”‚  β”‚             β”‚  β”‚               β”‚       β”‚  β”‚
β”‚  β”‚      β”‚  β€’ FastCGI      β”‚  β”‚  Database   β”‚  β”‚  HTML/CSS/JS  β”‚       β”‚  β”‚
β”‚  β”‚      β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β”‚  Manager    β”‚  β”‚               β”‚       β”‚  β”‚
β”‚  β”‚           β”‚     β”‚         β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚  β”‚
β”‚  β”‚           β”‚     β”‚                β”‚                                 β”‚  β”‚
β”‚  β”‚           β”‚     β”‚                β”‚                                 β”‚  β”‚
β”‚  β”‚           β”‚     └────────────────┼─────────────────┐               β”‚  β”‚
β”‚  β”‚           β”‚                      β”‚                 β”‚               β”‚  β”‚
β”‚  β”‚           β”‚                      β”‚                 β”‚               β”‚  β”‚
β”‚  β”‚      β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚  β”‚
β”‚  β”‚      β”‚    Redis      β”‚      β”‚   MariaDB    β”‚  β”‚  FTP Server  β”‚     β”‚  β”‚
β”‚  β”‚      β”‚    (Cache)    β”‚      β”‚  (Database)  β”‚  β”‚              β”‚     β”‚  β”‚
β”‚  β”‚      β”‚               β”‚      β”‚              β”‚  β”‚  Port 21     β”‚     β”‚  β”‚
β”‚  β”‚      β”‚  Port 6379    β”‚      β”‚  Port 3306   β”‚  β”‚  Port 21000  β”‚     β”‚  β”‚
β”‚  β”‚      β”‚               β”‚----->β”‚              β”‚  β”‚              β”‚     β”‚  β”‚
β”‚  β”‚      β”‚  β€’ Object     β”‚      β”‚  β€’ WordPress β”‚  β”‚  β€’ FTPS      β”‚     β”‚  β”‚
β”‚  β”‚      β”‚    Caching    β”‚      β”‚    Data      β”‚  β”‚  β€’ Upload/   β”‚     β”‚  β”‚
β”‚  β”‚      β”‚  β€’ Session    β”‚      β”‚  β€’ Users     β”‚  β”‚    Download  β”‚     β”‚  β”‚
β”‚  β”‚      β”‚    Storage    β”‚      β”‚  β€’ Posts     β”‚  β”‚              β”‚     β”‚  β”‚
β”‚  β”‚      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚  β”‚
β”‚  β”‚                                                                    β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚  β”‚
β”‚  β”‚  β”‚                       cAdvisor                              β”‚   β”‚  β”‚
β”‚  β”‚  β”‚                  (Monitoring Service)                       β”‚   β”‚  β”‚
β”‚  β”‚  β”‚                                                             β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β€’ Port 8081                                                β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β€’ Monitors all containers                                  β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β€’ Resource usage metrics                                   β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β€’ Performance analytics                                    β”‚   β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚  β”‚
β”‚  β”‚                                                                    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚                      Docker Volumes                                β”‚  β”‚
β”‚  β”‚                                                                    β”‚  β”‚
β”‚  β”‚  β€’ wordpress-data  β†’ /var/www/html (WordPress files)               β”‚  β”‚
β”‚  β”‚  β€’ mariadb-data    β†’ /var/lib/mysql (Database files)               β”‚  β”‚
β”‚  β”‚  β€’ nginx-certs     β†’ /etc/nginx/ssl (SSL certificates)             β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

  1. (https://docs.docker.com/get-started/docker-overview/)
  2. (https://docs.docker.com/engine/security/#kernel-namespaces)
  3. (https://docs.docker.com/build/concepts/dockerfile/)
  4. (https://docs.docker.com/engine/storage/volumes/)

πŸ“š References

πŸ“– Books & Documentation

  • Docker Deep Dive: Zero to Docker in a single book
    by Nigel Poulton

πŸ” Security & Standards

πŸ› οΈ Core Technologies

πŸ—„οΈ Database & CMS

πŸ”§ Additional Tools


About

Production-grade multi-service Docker infrastructure built without pre-built images. Covers networking, TLS termination, secret management, persistent storage, and container monitoring.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors