What Is Docker
What Is Docker
• The container becomes the unit for distributing and testing your
application.
• Your developers write code locally and share their work with their
colleagues using Docker containers.
• They use Docker to push their applications into a test environment and
run automated and manual tests.
• When developers find bugs, they can fix them in the development
environment and redeploy them to the test environment for testing and
validation.
Docker architecture
The Docker daemon (dockerd) listens for Docker API requests and manages
Docker objects such as images, containers, networks, and volumes. A daemon
can also communicate with other daemons to manage Docker services.
The Docker client (docker) is the primary way that many Docker users
interact with Docker. When you use commands such as docker run, the client
sends these commands to dockerd, which carries them out. The docker command
uses the Docker API. The Docker client can communicate with more than one
daemon.
Docker Desktop
Docker Desktop is an easy-to-install application for your Mac, Windows or
Linux environment that enables you to build and share containerized
applications and microservices. Docker Desktop includes the Docker daemon
(dockerd), the Docker client (docker), Docker Compose, Docker Content Trust,
Kubernetes, and Credential Helper. For more information, see Docker Desktop.
Docker registries
A Docker registry stores Docker images. Docker Hub is a public registry that
anyone can use, and Docker looks for images on Docker Hub by default. You
can even run your own private registry.
When you use the docker pull or docker run commands, Docker pulls the
required images from your configured registry. When you use the docker
push command, Docker pushes your image to your configured registry.
Docker objects
When you use Docker, you are creating and using images, containers,
networks, volumes, plugins, and other objects. This section is a brief
overview of some of those objects.
Images
You might create your own images or you might only use those created by
others and published in a registry. To build your own image, you create a
Dockerfile with a simple syntax for defining the steps needed to create the
image and run it. Each instruction in a Dockerfile creates a layer in the
image. When you change the Dockerfile and rebuild the image, only those
layers which have changed are rebuilt. This is part of what makes images so
lightweight, small, and fast, when compared to other virtualization
technologies.
Containers
When you run this command, the following happens (assuming you are using the
default registry configuration):
1. If you don't have the ubuntu image locally, Docker pulls it from your
configured registry, as though you had run docker pull ubuntu manually.
6. When you run exit to terminate the /bin/bash command, the container
stops but isn't removed. You can start it again or remove it.