{"id":23073685,"url":"https://github.com/akashdip2001/docker","last_synced_at":"2026-05-09T04:32:54.591Z","repository":{"id":267041877,"uuid":"900105246","full_name":"akashdip2001/docker","owner":"akashdip2001","description":"Docker for study","archived":false,"fork":false,"pushed_at":"2024-12-19T22:28:01.000Z","size":146,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T11:33:39.622Z","etag":null,"topics":["docker","docker-compose","docker-container","docker-image","dockerfile","study-notes"],"latest_commit_sha":null,"homepage":"","language":null,"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/akashdip2001.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,"publiccode":null,"codemeta":null}},"created_at":"2024-12-07T21:52:18.000Z","updated_at":"2024-12-21T13:48:06.000Z","dependencies_parsed_at":"2024-12-07T22:25:51.912Z","dependency_job_id":"5b457eb4-a38c-4a94-a2e7-5b2b695c5439","html_url":"https://github.com/akashdip2001/docker","commit_stats":null,"previous_names":["akashdip2001/docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akashdip2001/docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashdip2001%2Fdocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashdip2001%2Fdocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashdip2001%2Fdocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashdip2001%2Fdocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akashdip2001","download_url":"https://codeload.github.com/akashdip2001/docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashdip2001%2Fdocker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","docker-container","docker-image","dockerfile","study-notes"],"created_at":"2024-12-16T08:18:44.117Z","updated_at":"2026-05-09T04:32:54.569Z","avatar_url":"https://github.com/akashdip2001.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Notes for DevOps Engineering\n\n## **Table of Contents**\n\n### **1. Introduction to Docker**  \n- [1.1 What is Docker?](#what-is-docker)  \n- [1.2 Installation](#installation)  \n- [1.3 Docker Container and Images](#docker-container-and-images)  \n- [1.4 Docker Hub](#docker-hub)  \n\n### **2. Docker Command Line Interface (CLI)**  \n- [2.1 Introduction to Docker CLI](#introduction-to-docker-cli)  \n- [2.2 Docker Image CLI](#docker-image-cli)  \n- [2.3 Docker Container CLI](#docker-container-cli)  \n\n### **3. Docker Custom Images**  \n- [3.1 Dockerfile](#dockerfile)  \n- [3.2 Containerize a Node.js Application](#containerize-a-nodejs-application)  \n- [3.3 Automatic Port Mapping](#automatic-port-mapping)  \n- [3.4 Pushing to Docker Hub](#pushing-to-docker-hub)  \n\n### **4. Docker Networking**  \n- [4.1 Bridge Mode Networking](#bridge-mode-networking)  \n- [4.2 Host Mode Networking](#host-mode-networking)  \n- [4.3 Overlay Mode Networking](#overlay-mode-networking)  \n- [4.4 IPvlan and MacVlan Networking](#ipvlan-and-macvlan-networking)  \n- [4.5 None Mode Networking](#none-mode-networking)  \n\n### **5. Docker Volumes**  \n- [5.1 Attaching Host Volumes](#attaching-host-volumes)  \n- [5.2 Custom Volumes](#custom-volumes)  \n\n### **6. Docker Compose**  \n- [6.1 Introduction to Docker Compose](#introduction-to-docker-compose)  \n- [6.2 Defining Docker Compose Files](#defining-docker-compose-files)  \n\n---\n\n## Docker Notes for DevOps Engineering\n\n---\n\n### **1. Introduction to Docker**\n\n#### [1.1 What is Docker?](#1.1)\n- **Definition:** Docker is a platform for developing, shipping, and running applications inside lightweight, portable containers.\n- **Key Benefits:**\n  - Consistency across environments\n  - Rapid application deployment\n  - Resource efficiency compared to traditional VMs\n\n#### [1.2 Installation](#1.2)\n- **Steps to Install:**\n  - [Windows](https://www.docker.com/products/docker-desktop/) : Use Docker Desktop (CLI + GUI)\n  - Linux: Use package managers like `apt` or `yum`\n  - MacOS: Docker Desktop or brew install docker\n- **Check Installation:** Run `docker --version`.\n\n    \u003cdetails\u003e\t\n     \u003csummary\u003e\u003cb\u003eimage Guide\u003c/b\u003e\u003c/summary\u003e\u003cbr\u003e\n  🚥🚥🚥🚥🚥🚥🚥🚥🚥🚥\n      \n  ![Screenshot (654)](https://github.com/user-attachments/assets/f2cc64a9-88b3-4f2e-9eed-7584155d59bc)\n  ![Screenshot (656)](https://github.com/user-attachments/assets/a12a2241-42ca-45b4-bc4d-f2aa8d6cedb8)\n  ![Screenshot (658)](https://github.com/user-attachments/assets/f87b7e8b-d953-4a88-b303-49d61f2b439e)\n  ![Screenshot (657)](https://github.com/user-attachments/assets/8fcfd239-7cc9-4b69-a971-e0dff86d2122)\n  🚥🚥🚥🚥🚥🚥🚥🚥🚥🚥\n  \u003c/details\u003e\n  \n  ### ========================\u003e\u003e\u003e Its automaticly detect the WSL Linux \n  ![Screenshot (665)](https://github.com/user-attachments/assets/a16bdb3e-175c-45a9-babe-389cfd87adcf)\n\n  \n#### [1.3 Docker Container and Images](#1.3)\n- **Image:** A lightweight, standalone, and executable software package.\n- **Container:** An instance of an image running as an isolated process.\n- **Commands:**\n  ```bash\n  docker pull \u003cimage-name\u003e\n  docker run \u003cimage-name\u003e\n  ```\n\n![Screenshot (666)](https://github.com/user-attachments/assets/4e6482e7-38d7-42f4-b32f-7680d57042a5)\n\n## 🧫 [Run Docker in WSL](./01%20Docker%20in%20WSL-Kali.md)\n\n#### [1.4 Docker Hub](#1.4)\n- A cloud-based repository to store and share Docker images.\n- **Usage:**\n  - Find public images\n  - Push custom images using `docker push`\n\n---\n\n### **2. Docker Command Line Interface (CLI)**\n\n#### [2.1 Introduction to Docker CLI](#2.1)\n- **Purpose:** Manage images, containers, and Docker resources using the terminal.\n- **Basic Commands:**\n  - `docker ps` – List running containers\n  - `docker images` – List images\n\n#### [2.2 Docker Image CLI](#2.2)\n- **Key Commands:**\n  - `docker pull \u003cimage\u003e` – Download an image\n  - `docker rmi \u003cimage\u003e` – Remove an image\n\n#### [2.3 Docker Container CLI](#2.3)\n- **Key Commands:**\n  - `docker run \u003cimage\u003e` – Start a container\n  - `docker stop \u003ccontainer\u003e` – Stop a running container\n  - `docker logs \u003ccontainer\u003e` – View logs from a container\n\n1. [x] [Running Ubuntu img in Containers](./01%20Docker%20in%20WSL-Kali.md)\n2. [x] [Multiple Containers](./02%20Docker%20Custom%20Images.md)\n3. [ ] [Port Mapping](./03%20Port%20Mapping.md)\n\n---\n\n### **3. Docker Custom Images**\n\n#### [3.1 Dockerfile](#3.1)\n- **Definition:** A text file containing instructions to [build a Docker image](./02%20Docker%20Custom%20Images.md).\n- **Sample Dockerfile:**\n  ```dockerfile\n  FROM node:14\n  COPY . /app\n  WORKDIR /app\n  RUN npm install\n  CMD [\"node\", \"app.js\"]\n  ```\n- **Command to Build:**\n  ```bash\n  docker build -t \u003cimage-name\u003e .\n  ```\n\n#### [3.2 Containerize a Node.js Application](#3.2)\n- Steps to:\n  - Create a `Dockerfile`\n  - Use `docker build` and `docker run`\n\n#### [3.3 Automatic Port Mapping](#3.3)\n- Map ports using `-p` flag:\n  ```bash\n  docker run -p 3000:3000 \u003cimage\u003e\n  ```\n\n#### [3.4 Pushing to Docker Hub](#3.4)\n- Authenticate: `docker login`\n- Push Image:\n  ```bash\n  docker tag \u003cimage\u003e \u003cusername\u003e/\u003crepository\u003e\n  docker push \u003cusername\u003e/\u003crepository\u003e\n  ```\n\n---\n\n### **4. Docker Networking**\n\n#### [4.1 Bridge Mode Networking](#4.1)\n- Default mode. Containers share the host's networking but are isolated.\n- **Command:**\n  ```bash\n  docker network inspect bridge\n  ```\n\n#### [4.2 Host Mode Networking](#4.2)\n- Shares the host network namespace.\n- Useful for performance-critical apps.\n\n#### [4.3 Overlay Mode Networking](#4.3)\n- Enables multi-host container communication.\n\n#### [4.4 IPvlan and MacVlan](#4.4)\n- Advanced networking modes for performance and integration.\n\n#### [4.5 None Mode Networking](#4.5)\n- Completely disables networking for the container.\n\n---\n\n### **5. Docker Volumes**\n\n#### [5.1 Attaching Host Volumes](#5.1)\n- Mount directories from the host into the container.\n- **Command:**\n  ```bash\n  docker run -v /host/path:/container/path \u003cimage\u003e\n  ```\n\n#### [5.2 Custom Volumes](#5.2)\n- Named volumes for persistent storage:\n  ```bash\n  docker volume create myvolume\n  ```\n\n---\n\n### **6. Docker Compose**\n\n#### [6.1 Introduction to Docker Compose](#6.1)\n- A tool to define and run multi-container Docker applications.\n\n#### [6.2 Defining Docker Compose Files](#6.2)\n- **Sample `docker-compose.yml`:**\n  ```yaml\n  version: '3'\n  services:\n    app:\n      image: node:14\n      ports:\n        - \"3000:3000\"\n  ```\n\n- Commands:\n  ```bash\n  docker-compose up\n  docker-compose down\n  ```\n\n---\n\n### **Tables for Quick Reference**\n\n| **Command**                | **Description**                              |\n|----------------------------|----------------------------------------------|\n| `docker pull \u003cimage\u003e`      | Download an image                           |\n| `docker run \u003cimage\u003e`       | Create and start a container                |\n| `docker ps`                | List running containers                     |\n| `docker stop \u003ccontainer\u003e`  | Stop a running container                    |\n| `docker volume create`     | Create a named volume                       |\n\n| **Networking Mode**        | **Description**                              |\n|----------------------------|----------------------------------------------|\n| Bridge                     | Default mode, isolated container networking |\n| Host                       | Shares host's network namespace             |\n| Overlay                    | For multi-host communication                |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakashdip2001%2Fdocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakashdip2001%2Fdocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakashdip2001%2Fdocker/lists"}