17 septiembre, 2024

What is Docker Network Prune? | Bootcamps

Currently in the technological world, the Docker container platform is one of the most popular and used. To implement this system, you must know its commands and what they are for; So, The Docker Network Prune command stands out as one of the most important to work with networks of the platform. Find out in this post what it is, how to use it and what your options are.

What is Docker Network Prune?

Docker Network Prune is a command that allows all networks that are not in use to be automatically deletedthat is, those that do not refer to any container within the platform.

This option arises from a parent command called docker networkwhich is responsible for the complete management and administration of the system networks, taking care of tasks such as enumeration, elimination, network connection and others.

Docker Network Prune Syntax

Docker Network Prune also has a syntax, which is nothing more than the format in which the user must type it on the command line of Docker to be able to execute the tasks of this tool. This syntax is: $docker network prune [OPTIONS].

Options

The parameter of «OPTIONS» included in the syntax can be replaced with any of the options available in the Docker Network Prune command to expand its operation. Within these options you can find:

–filter

The option –filter Docker Network Prune is a key-value format or key value which is responsible for provide filter valuessuch as:

until (): is used for delete only networks that were created before the timestamp set with this parameter.labels: this option can be executed in the formats label=, label= = , label!= either label! = =. It has the task of eliminating networks with or without (according to what is specified) established labels.

–force

This Docker Network Prune option can also be run on the command line in the form -force and is used for the purpose of do not ask for additional information at the time of deletion the platform networks.

What is the next step?

In this article you have learned what the Docker Network Prune command is, as well as when and how to use it within the platform. Now, if you want to continue learning about this and other Docker options and other tools in the technology sector, Do not hesitate to continue your training process by taking our DevOps & Cloud Computing Full Stack Bootcamp. It will only take you 6 months and, when you finish, you will know everything you need to improve and streamline your technological projects. In a very short time, in addition, you will have become an expert in the IT world to stand out in the sector. Dare to take the next step in your learning process and sign up for our bootcamp!

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *