Here are some basic Docker terminologies to help you understand the core concepts:
- Image
A Docker image is a lightweight, standalone, and immutable file that contains all the dependencies, code, libraries, and environment needed to run an application. Images are like templates from which containers are created. You can think of an image as a snapshot of an environment.
- Container
A container is a runtime instance of a Docker image. It is a lightweight, portable, and isolated environment where the application runs. Containers are faster to start and use fewer resources compared to virtual machines because they share the host OS kernel.
- Dockerfile
A Dockerfile is a script containing a set of instructions to build a Docker image. It specifies the base image, dependencies, application code, environment variables, and commands to run within the container.
- Registry
A Docker registry is a storage and distribution system for Docker images. The most popular public registry is Docker Hub, where users can upload and download images. You can also create private registries for specific use cases.
- Docker Hub
Docker Hub is a cloud-based public registry that allows users to find, share, and manage Docker images. You can pull official images or upload your custom images to share with others.
- Volume
A volume is a mechanism to store data outside the container's writable layer. It enables data persistence, meaning your data remains intact even if the container stops or is removed. Volumes are essential for applications that need to store state or data, like databases.
- Network
Docker networking allows containers to communicate with each other and with the outside world. Docker creates an isolated network for containers, and you can define custom networks for better security and organization.
- Docker Compose
Docker Compose is a tool for defining and running multi-container Docker applications. It uses a YAML file (docker-compose.yml) to configure all the services, networks, and volumes needed for an application.
- Service
In Docker Swarm (a container orchestration tool), a service is a description of how containers behave in production. It allows you to scale containers across multiple nodes, providing load balancing and failover capabilities.
- Swarm
Docker Swarm is a native clustering and orchestration tool for Docker that allows you to manage multiple Docker hosts as a single virtual host. It handles the deployment, scaling, and management of containers across a cluster of Docker nodes.
- Node
In Docker Swarm, a node is a machine (physical or virtual) that is part of the Swarm cluster. There are two types of nodes:
Manager Node: Responsible for managing the cluster and orchestrating the deployment of services.
Worker Node: Executes tasks assigned by the manager.
- Task
A task is the smallest unit of work in Docker Swarm. Each task represents a single container running on a worker node. When a service is scaled up, more tasks are created and distributed across the Swarm nodes.
- Bind Mount
A bind mount is a way to mount a directory or file from the host system into a container. Unlike volumes, bind mounts are tightly coupled to the directory structure and contents of the host system.
- Docker Daemon
The Docker daemon (dockerd) is a background service running on the host machine that listens for Docker API requests and manages Docker objects, such as images, containers, and networks. It also communicates with other Docker daemons to manage services.
- Client
The Docker client is the command-line interface (docker) used to interact with the Docker daemon. You can run commands like docker run, docker build, and docker pull to manage containers and images.
These terms form the foundation of understanding how Docker operates. If you need further explanation on any of these or have additional questions, feel free to ask!
Top comments (0)