1. What is Docker?
A: Docker is a form of containerization or visualizing the operating system in the form of computer code level, written in the Go programming language. It supports multiple operating systems such as Linux, Windows, Mac OS.
2. What is Docker Container?
A: A container is nothing but a running process, with some added encapsulation features applied to it in order to keep it
isolated from the host and from other containers. One of the most important aspects of container isolation is that each
container interacts with its own, private file-system; this file-system is provided by a Docker image.
Notes: Docker Concepts
Docker is a platform for developers and sysadmins to build, share, and run applications with containers. The use of containers to deploy applications is called containerization. Containers are not new, but their use for easily deploying applications is.
Containerization is increasingly popular because containers are:
- Flexible: Even the most complex applications can be containerized.
- Lightweight: Containers leverage and share the host kernel, making them much more efficient in terms of system resources than virtual machines.Portable: You can build locally, deploy to the cloud, and run anywhere.
- Loosely coupled: Containers are highly self-sufficient and encapsulated, allowing you to replace or upgrade one without disrupting others.
- Scalable: You can increase and automatically distribute container replicas across a data center.
- Secure: Containers apply aggressive constraints and isolation to processes without any configuration required on the part of the user.
3. What are the components of Docker Architecture and explain?
A: The Docker works on a client-server architecture. The Docker client establishes communication with the Docker Daemon.
The Docker client and daemon can run on the same system. A Docket client can also be connected to a remote Docker daemon.
Types of Docker components in a Docker architecture are–
1. Docker Client: This performs Docker build pull and run operations to establish communication with the Docker Host. The Docker command uses the Docker API to call the queries to be run.
2. Docker Host: This component contains Docker Daemon, Containers and its images. The images will be the kind of metadata for the applications which are containerized in the containers. The Docker Daemon establishes a connection with Registry.
3. Registry: This component will be storing the Docker images. The public registries are Docker Hub and Docker Cloud which can be s used by anyone.
4. What are Docker Image and Docker Hub?
A: The Docker Image is a set of files and a combination of parameters that will allow creating the instances to
run in separate containers as an isolated process. The Docker hub is a kind of repository to the images where these
images can be stored and this access is public.
The Docker run command can be used to create the instance called container which can be run using the Docker image. Docker hub is the largest public repository of the image containers
which is being maintained by the community of developers and individual contributors.
5. Difference between Docker Image and container?
A: Docker container is the runtime instance of the docker image. Docker Image does not have a state, and its state never changes as it is just a set of files whereas the docker container has its execution state.
6. What is the lifecycle of a Docker Container?
A: Below is the lifecycle of a docker container:
1. Create a container.
2. Run the Docker container.
3. Pause the Container.
4. Unpause the Container.
5. Start the Container.
6. Stop the Container.
7. Restart the Container.
8. Kill the Container.
9. Destroy the Container.
7. What are Docker Objects?
A: Docker images, containers, networks, volumes, plugins etc are the Docker objects.
8. What is the Docker image?
A: The Docker image help to create Docker containers. You can create the Docker image with the build command. Due to this, it creates a container that starts when it begins to run. Every docker images are stored in the Docker registry.
9. What is Docker Engine?
A: Docker daemon or Docker engine represents the server. The docker daemon and the clients should be run on the same or remote host, which can communicate through command-line client binary and full RESTful API.