What is Docker?
Docker is a containerization platform which packages your application and all its dependencies together in the form of containers so as to ensure that your application works seamlessly in any environment be it development or test or production.
What is Docker image?
Docker image is the source of Docker container. In other words, Docker images are used to create containers. Images are created with the build command, and they’ll produce a container when started with run. Images are stored in a Docker registry such as registry.hub.docker.com because they can become quite large, images are designed to be composed of layers of other images, allowing a minimal amount of data to be sent when transferring images over the network.
How is Docker different from other container technologies?
Docker containers are easy to deploy in a cloud. It can get more applications running on the same hardware than other technologies, it makes it easy for developers to quickly create, ready-to-run containerized applications and it makes managing and deploying applications much easier. You can even share containers with your applications.
What is Docker Machine?
We can use Docker Machine to install Docker Engine on virtual hosts. It also provides commands to manage virtual hosts.
Some of the popular Docker machine commands enable us to start, stop, inspect and restart a managed host.
Docker Machine provides a Command Line Interface (CLI), which is very useful in managing multiple hosts.
Why do we use Docker Machine?
There are two main uses of Docker Machine:
Old Desktop: If we have an old desktop and we want to run Docker then we use Docker Machine to run Docker. It is like installing a virtual machine on an old hardware system to run Docker engine.
Remote Hosts: Docker Machine is also used to provision Docker hosts on remote systems. By using Docker Machine, you can install Docker Engine on remote hosts and configure clients on them.
What is Docker Hub?
Docker Hub is a cloud-based registry. We can use Docker Hub to link code repositories. We can even build images and store them in Docker Hub. It also provides links to Docker Cloud to deploy the images to our hosts.
Docker Hub is a central repository for container image discovery, distribution, change management, workflow automation and team collaboration.
What are the main features of Docker Hub?
Docker Hub provides following main features:
Image Repositories: In Docker Hub we can push, pull, find and manage Docker Images. It is a big library that has images from community, official as well as private sources.
Automated Builds: We can use Docker Hub to create new images by making changes to source code repository of the image.
Webhooks:With Webhooks in Docker Hub we can trigger actions that can create and build new images by pushing a change to repository.
Github/Bitbucket integration: Docker Hub also provides integration with Github and Bitbucket systems.
What is Docker Entrypoint?
·         We use Docker Entrypoint to set the starting point for a command in a Docker Image.
·         We can use the entrypoint as a command for running an Image in the container.
What is Docker Swarm?
Docker Swarm is native clustering for Docker. It turns a pool of Docker hosts into a single, virtual Docker host. Docker Swarm serves the standard Docker API, any tool that already communicates with a Docker daemon can use Swarm to transparently scale to multiple hosts.
What are the features of Docker Swarm?
Some of the key features of Docker Swarm are as follows:
Compatible:Docker Swarm is compatible with standard Docker API.
High Scalability: Swarm can scale up to as much as 1000 nodes and 50000 containers. There is almost no performance degradation at this scale in Docker Swarm.
Networking:Swarm comes with support for Docker Networking.
High Availability: We can create a highly available system with Docker Swarm. It allows use to create multiple master nodes so that in case of a failure, another node can take over.
Node Discovery: In Docker Swarm, we can add more nodes and the new nodes can be found with any discovery service like etcd or zookeeper etc.
What are the three main steps of Docker Compose?
Three main steps of Docker Compose are as follows:
Environment: We first define the environment of our application with a Dockerfile. It can be used to recreate the environment at a later point of time.
Services:Then we define the services that make our app in docker-compose.yml. By using this file we can define how these services can be run together in an environment.
Run: The last step is to run the Docker Container. We use docker-compose up to start and run the application.
What are the common use cases of Docker?
Some of the common use cases of Docker are as follows:
Setting up Development Environment: We can use Docker to set the development environment with the applications on which our code is dependent.
Testing Automation Setup: Docker can also help in creating the Testing Automation setup. We can setup different services and apps with Docker to create the automation testing environment.
Production Deployment: Docker also helps in implementing the Production deployment for an application. We can use it to create the exact environment and process that will be used for doing the production deployment.
What are the main features of Docker-compose?
Some of the main features of Docker-compose are as follows:
Multiple environments on same Host: We can use it to create multiple environments on the same host server.
Preserve Volume Data on Container Creation: Docker compose also preserves the volume data when we create a container.
Recreate the changed Containers: We can also use compose to recreate the changed containers.
Variables in Compose file: Docker compose also supports variables in compose file. In this way, we can create variations of our containers.
What is the most popular use of Docker?
The most popular use of Docker is in build pipeline. With the use of Docker it is much easier to automate the development to deployment process in build pipeline.
We use Docker for the complete build flow from development work, test run and deployment to production environment.
What is the difference between Docker commands: up, run and start?
We have up and start commands in docker-compose. The run command is in docker.
Up: We use this command to build, create, start or restart all the services in a docker-compose.yml file. It also attaches to containers for a service.This command can also start linked services.
Run: We use this command for adhoc requests. It just starts the service that we specifically want to start. We generally use it run specific tests or any administrative tasks.
Start:This command is used to start the container that were previously created but are not currently running. This command does not create new containers.
How will you take backup of Docker container volumes in AWS S3?
We can use a utility named Dockup provided by Docker Cloud to take backup of Docker container volumes in S3.
What is the basic architecture behind Docker?
Docker is built on client server model. Docker server is used to run the images. We use Docker client to communicate with Docker server.
Clients tell Docker server via commands what to do.
Additionally, there is a Registry that stores Docker Images. Docker Server can directly contact Registry to download images.
Why do we use Docker on top of a virtual machine?
Generally, we use Docker on top of a virtual machine to ensure isolation of the application. On a virtual machine, we can get the advantage of security provided by hypervisor. We can implement different security levels on a virtual machine. And Docker can make use of this to run the application at different security levels.
What is Build cache in Docker?
When we build an Image, Docker will process each line in Dockerfile. It will execute the commands on each line in the order that is mentioned in the file. But at each line, before running any command, Docker will check if there is already an existing image in its cache that can be reused rather than creating a new image.
This method of using cache in Docker is called Build cache in Docker.
We can also specify the option –no-cache=true to let Docker know that we do not want to use cache for Images. With this option, Docker will create all new images.
What are the main benefits of using Docker?
Docker is a very powerful tool. Some of the main benefits of using Docker are as follows:
Utilize Developer Skills: With Docker we maximize the use of Developer skills. With Docker there is less need of build or release engineers. Same Developer can create software and wrap it in one single file.
Standard Application Image: Docker based system allows us to bundle the application software and Operating system files in a single Application Image that can be deployed independently.

Uniform deployment: With Docker we can create one package of our software and deploy it on different platforms seamlessly.
Request to Download PDF

Post A Comment:

0 comments: