- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1383 Articles for Open Source
6K+ Views
Docker provides a plethora of useful Docker commands that will help you to create, manipulate, and manage Docker objects such as volumes, images, containers, networks, etc. If you have been working with Docker for a long time now, you might have several Docker images already in your machine. Keeping track of all these images becomes quite difficult especially through a single command line.However, you can list all Docker images along with filtered outputs to get your desired results. In this article, we will discuss how to use different commands along with multiple options to list all Docker images in our ... Read More
14K+ Views
Managing multiple Docker containers in a single host machine through a single command line can become tough. Hence, it’s better to know the Docker commands to manage containers the best possible way. Docker provides us with many command line tools and utilities to manage containers. In this article, we will discuss how to list Docker containers through multiple ways. We will also look at how to filter the list output to get the desired results. So without any further ado, let’s get started.Listing Docker ContainersPredominantly, there are two major commands that you can use to display a list of all ... Read More
9K+ Views
If you are working with Docker for a long time now, you might already have lots of containers running in your host machine. At times, it becomes really difficult to keep track of all these containers. Moreover, if you are on a network or using compose, there might be several containers running inside the network. In such a case, determining which container is actively running and which has failed, is very difficult. You might need to ping these containers periodically to check their status. For this, you need to have the IP addresses of the containers.You can easily get the ... Read More
9K+ Views
When you execute the Docker pull command or Docker run command, the daemon first checks for a similar image in the local machine by comparing the digests of the image.If it finds a match, then it’s not required to search the registry for the image and the daemon can simply create a copy of the already existing image. However, if a copy is not found, it starts pulling it from the registry. The same is the case when you try to build images using a Dockerfile.We all know that Docker images are multi-layered files containing multiple image layers on top ... Read More
1K+ Views
While creating Docker images, you specify the build context for the image. The Image build context contains all the files that you want to be included inside the container that you will be from that image. This includes the source code of your application, Dockerfile, other system files, etc. Once you have specified the location of the build context using the Docker build command, you can build the image.Moreover, you can use the COPY instruction inside a Dockerfile or even the Docker cp command to copy files inside the container from the local machine. But what if you want to ... Read More
168 Views
You can use Docker volumes to achieve a solution for persistent storage in Docker. There are bind mounts as well but the problem with them is that they are highly dependent on the underlying host as well as the directory structure. The volumes are completely managed and controlled by Docker. With a bond mount, we mount a file or a directory of the host system to a container. We can reference the mounted directory by it’s absolute path.However, when we use a volume, we create a new directory inside the storage directory of Docker on the host machine which is ... Read More
16K+ Views
If you have a Docker container running and you want to copy files from the host machine to the Docker container, there are several ways to do it. One way to do this is by using the ADD or COPY instructions inside a Dockerfile and passing the paths of the files that you want to be in your container when you start it. But what happens if you already have a container running? It’s not feasible to build the same image again and again just for a small file to be included in it.To avoid this fiasco, Docker allows us ... Read More
2K+ Views
If you have a Docker image in your own local machine and you want that image to be copied into another machine, there are two ways to do that. The first is by pushing that image to a repository such as the ones in Dockerhub registry. You need to have an account in Dockerhub and then you can use the Docker push command to push the images on it.However, if you don’t want to go through all the hassles of creating an account, tagging the images, etc., there are other simple methods that you can use. Let’s check out all ... Read More
219 Views
When we speak about efficient utilization and proper allocation of computer resources, both virtual machines, and Docker containers are effective in their own ways. In the past few years, Docker containers have gained tremendous popularity among organizations of all sizes. It is very important to understand the use-cases and purposes that they both serve if you want to decide which of the two is better for your requirements. In this article, let’s discuss the basic differences between Docker containers and virtual machines.However, before we start the discussion make sure that you have the basic knowledge of what Docker is. You ... Read More
2K+ Views
If you have been using Docker for quite a long time now, you might have several unused images already existing in your local machine. These images might be previously downloaded older versions, or simply an image that you downloaded for testing. These images take up a lot of space unnecessarily and reduce the overall performance and experience. Moreover, they are several unused, dangling images as well.It’s always better to remove these older images which will help you to keep track of all your useful images in a better way. Docker allows you to remove images quite easily and through many ... Read More