Docker

docker.com

🌐 Resources πŸ”—

containerd.io/

Docker Architecture

Container - a way to package application will all the necessary dependencies and configuration

  • portable standardized artifact for efficient development and deployment

    • Devs & Ops work together to package the app in a container

    • No environment config needed on server (only Container Runtime)

  • layers of images

    • Linux base image

    • other layers

    • Application image

Container repositories

Docker - open source containerization platform

Docker image - the actual package file, artifact, consisting of layers

Docker container - started application, a running environment, virtual file system, port binding

Virtual machines - virtualize the OS Kernel and the Application layer - full copy of the OS, abstraction of physical hardware

Containerized Applications - docker.com

Containers - multiple containers share the OS Kernel - abstraction of the app layer

Virtual Machines - docker.com

Docker Engine acts as a client-server application with:

  • Server - dockerd, managing images & containers

    • Container Runtime

    • Volumes

    • Network

    • build images

  • API - interact with Docker Server

  • CLI - docker client

Docker Architecture diagram - docs.docker.com

Libnetwork implements Container Network Model (CNM) which formalizes the steps required to provide networking for containers while providing an abstraction that can be used to support multiple network drivers.

CNM Model - libnetwork

Docker Compose - define and run multiple docker containers applications

  • yaml file to configure application's services

  • easy maintenance and config

Dockerfile - text file with instructions to build Docker images

  • each instruction results in an image layer

  • used in CI/CD to build the docker image artifact, pushed to Docker (remote or local) repositories

  • each image is based on another base image (FROM <image>)

Dockerfile

Public repositories

Public repositories (container registries)

Image naming in Docker - registryDomain/imageName:tag

Volumes - persist container generated and used data, by mounting a folder from the physical host file system into the Docker virtual file system

  • databases

  • stateful applications

  • data automatically replicated

  • Host, Anonymous, Named volumes

Host Path - /var/lib/docker/volumes



Commands


Labs


Last updated

Was this helpful?