diff --git a/docker.html.markdown b/docker.html.markdown index d65947fe..d64c9b1c 100644 --- a/docker.html.markdown +++ b/docker.html.markdown @@ -6,39 +6,79 @@ contributors: - ["Ruslan López", "http://javapro.org/"] - ["Michael Chen", "https://github.com/ML-Chen"] - ["Akshita Dixit", "https://github.com/akshitadixit"] + - ["Marcel Ribeiro-Dantas", "https://github.com/mribeirodantas"] --- -Docker is a tool that helps you build, test, ship and run applications seamlessly across various machines. It replicates the environment our software needs on any machine. You can get Docker for your machine from https://docs.docker.com/get-docker/ +Docker is a tool that helps you build, test, ship and run applications +seamlessly across various machines. It replicates the environment our software +needs on any machine. You can get Docker for your machine from +https://docs.docker.com/get-docker/ + +It has grown in popularity over the last decade due to being lightweight and +fast as compared to virtual-machines that are bulky and slow. Unlike VMs, docker +does not need a full blown OS of its own to be loaded to start and does not +compete for resources other than what the application it is running will use. +VMs on the other hand are pretty resource intensive on our processors, disks and +memory hence running multiple VMs for various applications becomes a challenge +in a limited capacity architecture. -It has grown in popularity over the last decade due to being lightweight and fast as compared to virtual-machines that are bulky and slow. Unlike VMs, docker does not need a full blown OS of its own to be loaded to start and does not compete for resources other than what the application it is running will use. VMs on the other hand are pretty resource intensive on our processors, disks and memory hence running multiple VMs for various applications becomes a challenge in a limited capacity architecture.
-┌────────────────────────┐ ┌───────────────────────┐ ┌────────────────────────┐ ┌───────────────────────┐ -│ ┌───────────┐ │ │ ┌───────────┐ │ │ ┌───────────┐ │ │ ┌───────────┐ │ -│ │ App │ │ │ │ App │ │ │ │ App │ │ │ │ App │ │ -│ └───────────┘ │ │ └───────────┘ │ │ └───────────┘ │ │ └───────────┘ │ -│ ┌────────┐ ┌────────┐ │ │ ┌────────┐ ┌───────┐ │ │ ┌────────┐ ┌────────┐ │ │ ┌────────┐ ┌───────┐ │ -│ │ Libs │ │ Deps │ │ │ │ Libs │ │ Deps │ │ │ │ Libs │ │ Deps │ │ │ │ Libs │ │ Deps │ │ -│ └────────┘ └────────┘ │ │ └────────┘ └───────┘ │ │ └────────┘ └────────┘ │ │ └────────┘ └───────┘ │ -│ ┌───────────────────┐ │ │ ┌──────────────────┐ │ │ Container1 │ │ Container2 │ -│ │ OS │ │ │ │ OS │ │ └────────────────────────┘ └───────────────────────┘ -│ └───────────────────┘ │ │ └──────────────────┘ │ ┌──────────────────────────────────────────────────┐ -│ VM1 │ │ VM2 │ │ Docker │ -└────────────────────────┘ └───────────────────────┘ └──────────────────────────────────────────────────┘ -┌──────────────────────────────────────────────────┐ ┌──────────────────────────────────────────────────┐ -│ Hypervisor │ │ OS │ -└──────────────────────────────────────────────────┘ └──────────────────────────────────────────────────┘ -┌───────────────────────────────────────────────────┐ ┌──────────────────────────────────────────────────┐ -│ Hardware Infrastructure │ │ Hardware Infrastructure │ -└───────────────────────────────────────────────────┘ └──────────────────────────────────────────────────┘ - (VM based architecture) (Docker based architecture) +┌────────────────────────┐ ┌───────────────────────┐ +│ ┌───────────┐ │ │ ┌───────────┐ │ +│ │ App │ │ │ │ App │ │ +│ └───────────┘ │ │ └───────────┘ │ +│ ┌────────┐ ┌────────┐ │ │ ┌────────┐ ┌───────┐ │ +│ │ Libs │ │ Deps │ │ │ │ Libs │ │ Deps │ │ +│ └────────┘ └────────┘ │ │ └────────┘ └───────┘ │ +│ ┌───────────────────┐ │ │ ┌──────────────────┐ │ +│ │ OS │ │ │ │ OS │ │ +│ └───────────────────┘ │ │ └──────────────────┘ │ +│ VM1 │ │ VM2 │ +└────────────────────────┘ └───────────────────────┘ +┌──────────────────────────────────────────────────┐ +│ Hypervisor │ +└──────────────────────────────────────────────────┘ +┌──────────────────────────────────────────────────┐ +│ Hardware Infrastructure │ +└──────────────────────────────────────────────────┘ + (VM based architecture) + +┌────────────────────────┐ ┌───────────────────────┐ +│ ┌───────────┐ │ │ ┌───────────┐ │ +│ │ App │ │ │ │ App │ │ +│ └───────────┘ │ │ └───────────┘ │ +│ ┌────────┐ ┌────────┐ │ │ ┌────────┐ ┌───────┐ │ +│ │ Libs │ │ Deps │ │ │ │ Libs │ │ Deps │ │ +│ └────────┘ └────────┘ │ │ └────────┘ └───────┘ │ +│ Container1 │ │ Container2 │ +└────────────────────────┘ └───────────────────────┘ +┌──────────────────────────────────────────────────┐ +│ Docker │ +└──────────────────────────────────────────────────┘ +┌──────────────────────────────────────────────────┐ +│ OS │ +└──────────────────────────────────────────────────┘ +┌──────────────────────────────────────────────────┐ +│ Hardware Infrastructure │ +└──────────────────────────────────────────────────┘ + (Docker based architecture) +-Couple of terms we will encounter frequently are Docker Images and Docker Containers. Images are packages or templates of containers all stored in the [Docker Hub](https://hub.docker.com/). Containers are standalone, executable instances of these images which include code, runtime, system tools, system libraries and settings - everything required to get the software up and running. Coming to Docker, it follows a client-server architecture wherein the CLI client communicates with the server component, which here is, the Docker Engine using RESTful API to issue commands. +Couple of terms we will encounter frequently are Docker Images and Docker +Containers. Images are packages or templates of containers all stored in the +[Docker Hub](https://hub.docker.com/). Containers are standalone, executable +instances of these images which include code, runtime, system tools, system +libraries and settings - everything required to get the software up and running. +Coming to Docker, it follows a client-server architecture wherein the CLI client +communicates with the server component, which here is, the Docker Engine using +RESTful API to issue commands. ## The Docker CLI ```bash # after installing Docker from https://docs.docker.com/get-docker/ -# To list available commands, either run `docker` with no parameters or execute `docker help` +# To list available commands, either run `docker` with no parameters or execute +# `docker help` $docker >>> docker [OPTIONS] COMMAND [ARG...] @@ -65,65 +105,82 @@ $docker # […] $docker run hello-world -# `docker run