{"id":25382636,"url":"https://github.com/yehezkiel1086/docker-docs","last_synced_at":"2025-04-09T13:37:36.202Z","repository":{"id":273469249,"uuid":"662326746","full_name":"yehezkiel1086/docker-docs","owner":"yehezkiel1086","description":"Docker notes, scripts, small projects, and solutions from several sources","archived":false,"fork":false,"pushed_at":"2025-02-26T08:54:19.000Z","size":14336,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T09:35:02.797Z","etag":null,"topics":["docker","linux","shell"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/yehezkiel1086.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":"2023-07-04T22:15:10.000Z","updated_at":"2025-02-26T08:54:23.000Z","dependencies_parsed_at":"2025-02-19T09:36:00.874Z","dependency_job_id":null,"html_url":"https://github.com/yehezkiel1086/docker-docs","commit_stats":null,"previous_names":["yehezkiel1086/docker-docs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yehezkiel1086%2Fdocker-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yehezkiel1086%2Fdocker-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yehezkiel1086%2Fdocker-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yehezkiel1086%2Fdocker-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yehezkiel1086","download_url":"https://codeload.github.com/yehezkiel1086/docker-docs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248050366,"owners_count":21039376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","linux","shell"],"created_at":"2025-02-15T07:37:48.872Z","updated_at":"2025-04-09T13:37:36.173Z","avatar_url":"https://github.com/yehezkiel1086.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Docs\n\nDocker notes, small projects, and solutions from several sources.\n\n## Table of Contents\n\n- [What is docker?](#what-is-docker)\n  - [What is a container?](#what-is-a-container)\n  - [Before vs After Containers](#before-vs-after-containers)\n  - [Docker Image vs Container](#docker-image-vs-container)\n- [Docker vs Virtual Machine](#docker-vs-virtual-machine)\n- [Most Common Commands](#most-common-commands)\n\n## What is Docker?\n\n### What is a Container?\n\n- A way to **package** application with all the necessary **dependencies** and **configurations**\n- **Portable artifact**, easily shared and moved around\n- Makes development and deployment **more efficient**.\n- Layers of images\n- Mostly **Linux Base Image**, bc small in size\n- Application image on top\n\nContainers live in container repositories:\n- Private repositories\n- Public repository for Docker (e.g: DockerHub)\n\n### Before vs After Containers\n\n#### Before Containers\n\n- Installation process different on each OS environment\n- Many steps where something could go wrong\n- Configuration on server needed: Dependency version conflicts\n- Textual guide of deployment: Misunderstandings\n\n#### After Containers\n\n- Own isolated environment (based on lightweight linux)\n- Packaged with all needed configuration\n- One command to install the app\n- Run same app with 2 different versions\n- Developers and Operations work together to package the application in a container\n- No environmental configuration needed on server (except Docker Runtime)\n\n### Docker Image vs Container:\n  - Image:\n    - The actual package\n    - **Artifact**, that can be moved around\n  - Container:\n    - Actually **start the application**\n    - Container environment is created\n\n### Docker vs Virtual Machine\n\nThe difference lies on what parts of the operating system they virtualize:\n- Docker virtualizes the Applications layer\n- Virtual Machines virtualizes the OS Kernel and the Applications layer\n\nThis means:\n- **Size**: The size of Docker images are much smaller (couple of MB)\n- **Speed**: Docker containers start and run much fast\n- **Compatibility**: VM of any OS can run on any OS host -- Docker can't do this, a workaround is installing a technology called **Docker Toolbox** which abstracts away the Kernel\n\n### What is Docker?\n\nDocker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. - [Wikipedia](https://en.wikipedia.org/wiki/Docker_(software))\n\nFrom the above definition, basically, Docker consists of three things:\n1. A set of Platform as a Service (PaaS)\n2. Docker uses OS-level virtualization\n3. For delivery of software in packages called containers\n\n**Docker Architecture**:\n![Docker Diagram](https://sysdig.com/wp-content/uploads/image2-49.png)\n\n## Most Common Commands\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eCommand\u003c/th\u003e\n    \u003cth\u003eExplanation\u003c/th\u003e\n    \u003cth\u003eShorthand\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003edocker image ls\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eLists all images\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003edocker images\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003edocker image rm [image]\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eRemoves an image\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003edocker rmi\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003edocker image pull [image]\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003ePulls image from a docker registry\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003edocker pull\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003edocker container ls\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eLists running containers\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003edocker ps\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003edocker container ls -a\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eLists all containers\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003edocker ps -a\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003edocker container run [image]\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eRuns a container from an image\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003edocker run [image]\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003edocker container rm [container]\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eRemoves a container\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003edocker rm [container]\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003edocker container stop [container]\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eStops a container\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003edocker stop [container]\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003edocker container exec [container]\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eExecutes a command inside the container\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003edocker exec [container]\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Sources\n\n- [DevOps with Docker](https://devopswithdocker.com/)\n- [Docker Training](https://github.com/arsitektur-jaringan-komputer/Pelatihan-Docker)\n- [Docker Crash Course for Absolute Beginners](https://youtu.be/pg19Z8LL06w?si=t_eEymrAFJSpsakQ)\n- [Docker Tutorial for Beginners](https://youtu.be/3c-iBn73dDE?si=QvR97s1D0LiWULOt)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyehezkiel1086%2Fdocker-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyehezkiel1086%2Fdocker-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyehezkiel1086%2Fdocker-docs/lists"}