{"id":23402827,"url":"https://github.com/hamaarour/inception","last_synced_at":"2026-04-08T16:02:23.657Z","repository":{"id":231795501,"uuid":"773055858","full_name":"Hamaarour/Inception","owner":"Hamaarour","description":"Docker images with services such as MariaDB, Nginx, WordPress, Redis, FTP-server, Adminer and cadvisor in virtual…","archived":false,"fork":false,"pushed_at":"2024-04-18T14:10:30.000Z","size":1862,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-14T04:34:20.369Z","etag":null,"topics":["docker","docker-compose","mariadb","nginx","wordpress"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hamaarour.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-16T16:13:04.000Z","updated_at":"2024-12-17T13:34:57.000Z","dependencies_parsed_at":"2024-08-05T17:21:53.060Z","dependency_job_id":null,"html_url":"https://github.com/Hamaarour/Inception","commit_stats":null,"previous_names":["hamaarour/inception"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Hamaarour/Inception","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hamaarour%2FInception","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hamaarour%2FInception/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hamaarour%2FInception/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hamaarour%2FInception/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hamaarour","download_url":"https://codeload.github.com/Hamaarour/Inception/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hamaarour%2FInception/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31562697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","mariadb","nginx","wordpress"],"created_at":"2024-12-22T12:37:34.977Z","updated_at":"2026-04-08T16:02:23.643Z","avatar_url":"https://github.com/Hamaarour.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inception\n\nI'm exploring system administration through Docker, virtualizing images in my personal VM for hands-on experience.\n\n# Docker and VMs \n(Virtual Machines) are both virtualization technologies, but they work in fundamentally different ways. Here's a breakdown of their key differences:\n\n## Level of Virtualization:\n\n### Docker:\nWorks at the container level. It packages an application and its dependencies into a lightweight, portable unit called a container. Containers share the host operating system kernel, making them faster to start and use fewer resources.\n### VM:\nWorks at the machine level. It creates a complete virtual machine with its own operating system, applications, and files. VMs are more isolated and secure but require more resources and take longer to boot up.\n\n## Resource Usage:\n\n### Docker:\n Lightweight and efficient. Containers share the host kernel, reducing resource overhead. Multiple containers can run on a single machine, maximizing resource utilization.\n### VM:\n Resource-intensive. Each VM requires its own operating system, consuming more CPU, memory, and storage. Running multiple VMs can quickly deplete resources on a single machine.\n\n## Isolation:\n\n### Docker:\n Offers moderate isolation. Containers share the kernel but have their own user space, providing some isolation between applications. However, vulnerabilities in the kernel can affect all containers.\n### VM:\n Offers high isolation. Each VM has its own operating system, creating a strong barrier between applications and the host machine. This isolation enhances security.\n\n## Use Cases:\n\n### Docker:\nIdeal for microservices architectures, deploying multiple independent applications on a single server. It's also useful for development and testing environments where fast startup times and efficient resource usage are crucial.\n### VM:\nBetter suited for running legacy applications that require specific operating systems or for situations where high security is paramount. VMs are also useful for running entire desktop environments or different operating systems altogether.\n\n## Here's an analogy:\n\n### Docker:\nImagine containers as separate apartments in a building. They share the building's infrastructure (electricity, water) but have their own independent spaces.\n### VM:\nThink of VMs as individual houses on a street. Each house has its own utilities, yard, and structure, offering a higher degree of isolation.\nChoosing between Docker and VMs depends on your specific needs. If you require lightweight, portable environments for microservices or development, Docker is a great choice. If you need high isolation, security, or compatibility with specific operating systems, VMs might be a better fit.\n\n# How does TLS work?\n\nTLS uses public-key cryptography(new window) to verify the authenticity of a website. Every website that uses HTTPS (TLS) generates a mathematically related key pair:\n\nA private key, which is kept secret and used to sign data\nA public key, which anyone can use to verify that data\nWhen your browser tries to connect to a website (a domain name like proton.me), the server creates a digital signature(new window) using the private key, which the browser verifies using the corresponding public key. If successful, this verification proves you’re connecting to a server that belongs to the domain name you’re visiting.\n\nBut how can your browser be sure the server’s public key really belongs to that domain? To solve this problem, TLS uses TLS certificates to help verify the identity of the server you’re connecting to.\n\nWhat is a TLS certificate?\nA TLS certificate is a type of digital certificate issued by a certificate authority (CA)(new window) to certify the ownership of a public key.\n\nTLS certificates usually contain the following information:\n\nThe subject domain name (for example, proton.me)\nThe name of the issuing CA\nAdditional subject domain names, including subdomains, if any\nThe date of issue\nThe expiry date\nThe public key used to verify data (the subject organization keeps the private key secret)\nThe CA digitally signs(new window) the certificate, so if you trust the CA, you can be sure the public key belongs to the owners of the subject domain name.\n\nHow does a TLS certificate work?\nWhen you try to connect to a website using HTTPS, the website server sends your browser its TLS certificate.\n\nYour browser then verifies that the certificate is valid and digitally signed(new window) by a trusted CA by comparing it with information it stores about trusted CAs. This verification process uses public-key cryptography like RSA(new window) or ECC(new window) to prove the CA signed the certificate.\n\nThe signed certificate verifies the website server’s public key, which confirms that you’re communicating with the genuine server of the website you’re visiting, like https://proton.me, and not a hacker.\n\nThe server also authenticates a key exchange, resulting in a one-time session key that is used to send encrypted and authenticated data between the clients and the server.\n\nIn simplified terms, here’s how your browser and a website server establish a secure connection using a TLS certificate.\n\n\u003c!--add image im my assets--\u003e\n\n![How does TLS work](./assets/how-tls-works.png)\n\n# How to create a self-signed certificate\n\n```bash\nopenssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365\n```\n\n# How to create a self-signed certificate with a password\n\n```bash\nopenssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -passout pass:your_password\n```\n\n# How to create a self-signed certificate with a password and a passphrase\n\n```bash\nopenssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -passout pass:your_password -passin pass:your_passphrase\n```\n\n# How to create a self-signed certificate with a password and a passphrase and a subject\n\n```bash\nopenssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -passout pass:your_password -passin pass:your_passphrase -subj \"/C=US/ST=New York/L=New York/O=Example/OU=Example/CN=example.com\"\n```\n\n# How to create a self-signed certificate with a password and a passphrase and a subject and a SAN\n\n```bash\nopenssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -passout pass:your_password -passin pass:your_passphrase -subj \"/C=US/ST=New York/L=New York/O=Example/OU=Example/CN=example.com\" -addext \"subjectAltName=DNS:example.com,DNS:www.example.com\"\n```\n\n# How to create a self-signed certificate with a password and a passphrase and a subject and a SAN and a CA\n\n```bash\nopenssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -passout pass:your_password -passin pass:your_passphrase -subj \"/C=US/ST=New York/L=New York/O=Example/OU=Example/CN=example.com\" -addext \"subjectAltName=DNS:example.com,DNS:www.example.com\" -CA ca.pem -CAkey ca-key.pem -CAcreateserial -CAserial ca.srl\n```\n\n# Mariadb\n\nOpen another terminal and keep the terminal with the compose running. On this other terminal, run the following command to enter in the mariadb container.\n\n```sql\ndocker exec -it mariadb /bin/bash\n```\n\nThen run the command to enter in the mysql\n\n```sql\nmysql -u your_user -p db_name\n```\n\nThen run the command to see the tables\n\n```sql\nSHOW TABLES;\n```\n\nIf you see the tables, it means that all is ok. If you want to see the database, run the following command:\n\n```sql\nSELECT * FROM table_name\\G;\n```\n\nAnd if you want to delete a row in a table, run the following command:\n\n```sql\nDELETE FROM table_name WHERE column_name = some_value;\n```\n\n# DOCKER COMPOSE\n\nChoosing between expose and ports:\n\nUse ```expose``` : \n    when you want containers to communicate with each other on the same Docker network.\nUse ```ports```  :  \n    when you need to access a service running in a container from outside the Docker network, such as your local machine or the internet.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamaarour%2Finception","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamaarour%2Finception","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamaarour%2Finception/lists"}