• It is a platform that allows you to develop, ship, and run applications in a containerized environment.
  • It is a tool designed to make it easier to create, deploy, and run applications by using containers.
  • Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.
  • It is a tool that is designed to benefit both developers and system administrators, making it a part of many DevOps (developers + operations) toolchains.
  • It is not a programming language, framework, or library.

DockerWorking

Different ways to use Docker

  • Docker Desktop: It is an easy-to-install application for your Mac or Windows environment that enables you to build and share containerized applications and microservices.
  • Docker CLI: It is a command-line tool that allows you to interact with the Docker daemon.

What is a Container?

  • A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.

  • We’ve had virtual machines for a long time. The trouble with virtual machines is that they are very heavy on resources. Booting one up often takes longer than booting up your physical machine.

  • A container gives us 95% of the benefits that virtual machines offer (at least as back-end developers), but are super lightweight. Containers boot up in seconds, while virtual machines can take minutes.

ContainerVsVMDesign

  • Virtual machines virtualize hardware, they emulate what a physical computer does at a very low level. Containers virtualize at the operating system level. Isolation between containers that are running on the same machine is still really good. For the most part, it appears to each container as if it has its own operating and filesystem. In reality, a lot of resources are being shared, but they’re being shared securely through namespaces.

Docker Hub

  • Docker Hub: It is a cloud-based registry service that allows you to link to code repositories, build your images, test them, store manually pushed images, and link to Docker Cloud so you can deploy images to your hosts.
  • Can also use AWS-ECR or GCP-Container Registery.

Docker Architecture

  • Docker Daemon: It is a background service that runs on the host operating system. The Docker daemon is responsible for managing Docker objects such as images, containers, networks, and volumes.
  • Docker Containers: It is a runnable instance of a Docker image. You can create, start, stop, move, or delete a container using the Docker API or CLI.