Byte Ebi's Logo

Byte Ebi 🍀

A Bit everyday A Byte every week

Docker Notes 1 - Understanding Docker

Introduction to Docker and containerization technology

Ray

Containerization isolates different environments, allowing engineers to focus on development without spending excessive effort on environment setup.
Docker is currently a mature and popular containerization technology.

Transforming the OS into Application Each container allows only one command to be executed Default permissions will be root

For business

  • Convenient deployment
  • Portability

Evolution of Containers

What is a Container?

Glossary

  • Stateful
  • Stateless: Without setting, each creation will eliminate old data
  • Repository
    • Similar to apt, brew, or yum sources
    • Stores many images (Packages)
  • Image
    • Equivalent to Package
    • Generates a special cache; if there’s a local cache, there’s no need to fetch from the Repository (like Docker Hub) again
  • Container
    • Created from an image
    • Equivalent to individual programs that can run continuously
    • Must have a foreground-running program
  • Network
    • none: No network
    • bridge: LAN
    • overlay: Different segments
    • container: Docker’s default network connection, cannot be accessed directly from outside
    • host: Shares network interfaces with the host
  • Volume
    • Persistent (Stateful) space within Docker, secret (space) stateful
    • Equivalent to local space

Architecture

Lifecycle

  1. Client calls docker daemon
  2. Docker daemon communicates with host network / host cgroups
  3. Determine if the docker container exists
  4. Unpack the layers from the local image
  5. If the local image does not exist, fetch from the repository
  6. Create docker container

Learning Resources

Online practice environment: Play with Docker

Docker Basic Concepts and Usage Tutorial: Building Docker Images - G. T. Wang

Overview of Docker

30 Days with Mr. Whale

Recent Posts

Categories

Tags