From 4d44ab245227e9386dc07d5a7ded1319d22e6a0e Mon Sep 17 00:00:00 2001 From: RadinPirouz Date: Wed, 11 Sep 2024 14:09:04 +0330 Subject: [PATCH] Update Docker Information --- .../Ansible/5-Vault.md | 1 + .../Docker/1-Information.md | 34 +++++++++++++++++++ .../Docker/{Docker.md => 2-Commands.md} | 7 +--- .../Docker/Info.md | 27 --------------- 4 files changed, 36 insertions(+), 33 deletions(-) create mode 100755 Containerization & Orchestration/Docker/1-Information.md rename Containerization & Orchestration/Docker/{Docker.md => 2-Commands.md} (96%) delete mode 100755 Containerization & Orchestration/Docker/Info.md diff --git a/Configuration Management & Automation/Ansible/5-Vault.md b/Configuration Management & Automation/Ansible/5-Vault.md index fb74ab3..8e3ad88 100644 --- a/Configuration Management & Automation/Ansible/5-Vault.md +++ b/Configuration Management & Automation/Ansible/5-Vault.md @@ -89,4 +89,5 @@ When you run the command, you will be prompted to enter the Vault password to de ansible-vault encrypt secret.yaml ``` + Ansible Vault provides a powerful way to securely manage sensitive data in your automation processes. \ No newline at end of file diff --git a/Containerization & Orchestration/Docker/1-Information.md b/Containerization & Orchestration/Docker/1-Information.md new file mode 100755 index 0000000..ce92e29 --- /dev/null +++ b/Containerization & Orchestration/Docker/1-Information.md @@ -0,0 +1,34 @@ +# Docker Overview + +## What is Docker? + +[Docker](https://www.docker.com/) is an open-source platform that streamlines the development, shipping, and deployment of applications using containers. Containers are lightweight, self-contained environments that bundle everything required to run an application, including code, runtime, libraries, and dependencies. By using Docker, developers can ensure that applications run consistently across different environments, whether in development, testing, or production. + +## Core Docker Concepts + +### Stateless vs. Stateful Applications + +- **Stateless**: These applications do not retain user data between sessions. For example, web servers like Nginx are typically stateless, as they don’t need to save any data between requests. +- **Stateful**: These applications retain data across sessions, which means they store information that can be retrieved later. Databases are common examples of stateful applications. + +## Key Docker Components + +### Docker Images + +A Docker image is a read-only template that defines the environment in which your application runs. It includes the application code, along with all necessary runtime components, libraries, and dependencies. Images are created using a Dockerfile—a script that automates the process of setting up the environment. Once an image is built, it can be used to create one or more containers. + +### Docker Containers + +A Docker container is a runnable instance of an image. It encapsulates everything the application needs to run, ensuring isolation from the host system and other containers. Containers are highly portable and can be moved across different environments without affecting their functionality. This makes them ideal for developing, testing, and deploying applications in a consistent manner. + +### Dockerfile + +A Dockerfile is a simple text file that contains a set of instructions for building a Docker image. These instructions specify the base image to use, the environment variables, dependencies, and commands required to assemble the application environment. By defining these steps in a Dockerfile, developers can automate the image creation process, ensuring that the application behaves the same way in every environment. + +### Docker Hub + +[Docker Hub](https://hub.docker.com/) is a centralized cloud-based repository service where Docker images are stored, shared, and managed. It allows developers to pull pre-built images from public repositories or to push and distribute their own images. Docker Hub simplifies the process of finding and using images created by others, fostering collaboration within the developer community. + +## Conclusion + +Docker revolutionizes the way applications are developed, shipped, and deployed by providing a consistent environment that works across various platforms. Through the use of containers, Docker makes applications portable, scalable, and easy to manage. Its comprehensive ecosystem of tools and services has established Docker as a critical component in modern software development pipelines, enabling faster, more reliable deployment of applications. diff --git a/Containerization & Orchestration/Docker/Docker.md b/Containerization & Orchestration/Docker/2-Commands.md similarity index 96% rename from Containerization & Orchestration/Docker/Docker.md rename to Containerization & Orchestration/Docker/2-Commands.md index 8ec0b59..7e8b83e 100755 --- a/Containerization & Orchestration/Docker/Docker.md +++ b/Containerization & Orchestration/Docker/2-Commands.md @@ -1,9 +1,4 @@ -# Docker Commands and Concepts - -## Docker Concepts - -- **Stateless**: Do not save your data (like Nginx). -- **Stateful**: Save your data. +# Docker Commands ## Docker Data Directory diff --git a/Containerization & Orchestration/Docker/Info.md b/Containerization & Orchestration/Docker/Info.md deleted file mode 100755 index a422524..0000000 --- a/Containerization & Orchestration/Docker/Info.md +++ /dev/null @@ -1,27 +0,0 @@ -# Docker Information - -## What is Docker? - -[Docker](https://www.docker.com/) is a platform for developing, shipping, and running applications in containers. Containers are lightweight, portable, and self-sufficient environments that contain everything needed to run an application, including the code, runtime, libraries, and dependencies. Docker provides a way to package and distribute applications as containers, allowing them to run consistently across different environments. - -## Key Concepts - -### Images - -An image is a read-only template used to create containers. It contains the application code, runtime, libraries, and dependencies needed to run the application. Images are built using a Dockerfile, which specifies the instructions for creating the image. - -### Containers - -A container is a runnable instance of an image. It encapsulates the application and its dependencies, providing isolation from the host system and other containers. Containers are lightweight, portable, and can be easily moved between different environments. - -### Dockerfile - -A Dockerfile is a text file that contains the instructions for building a Docker image. It specifies the base image, environment variables, dependencies, and commands needed to set up the application environment. Dockerfiles allow developers to automate the process of building images and ensure consistency across environments. - -### Docker Hub - -[Docker Hub](https://hub.docker.com/) is a cloud-based registry service that hosts Docker images. It provides a centralized repository for sharing, storing, and managing Docker images. Docker Hub allows developers to pull pre-built images from public repositories or publish their own images for others to use. - -## Conclusion - -Docker simplifies the process of developing, shipping, and running applications by providing a consistent environment across different platforms. It enables developers to package applications as containers, making them portable, scalable, and easy to deploy. With its rich ecosystem of tools and services, Docker has become a key technology in modern software development workflows.