Table: docker_network - Query Docker Networks using SQL
Docker Networks are a crucial component in Docker's architecture, enabling containers to communicate with each other and with outside networks. They are designed to facilitate network isolation and service discovery, which are essential for microservice architectures. Docker Networks also provide the flexibility to design and implement networking that fits a more complex application architecture.
Table Usage Guide
The docker_network
table offers insights into Docker Networks. Network administrators and DevOps engineers can utilize this table to obtain detailed information about Docker Networks, including their configuration, options, and the services running on them. This information can be valuable for troubleshooting network issues, optimizing network performance, and ensuring network security.
Examples
List all networks
Explore all the networks within your Docker environment. This can help in understanding the connectivity and isolation of your containers, aiding in better network management and security.
select *from docker_network;
select *from docker_network;
Control examples
Schema for docker_network
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
attachable | boolean | True if if the global scope is manually attachable by regular containers from workers in swarm mode. | |
config_from | jsonb | Source which will provide the configuration for this network. | |
config_only | boolean | True if the network is a place-holder for configuration of other networks only. | |
containers | jsonb | Endpoints belonging to the network. | |
created | timestamp with time zone | Time when the network was created. | |
driver | text | Driver is the Driver name used to create the network (e.g. 'bridge', 'overlay'). | |
enable_ipv6 | boolean | True if IPv6 is enabled. | |
id | text | ID of the network. | |
ingress | boolean | True if the network is providing the routing-mesh for the swarm cluster. | |
internal | boolean | True if if the network is used internal only. | |
ipam | jsonb | Network IP address management. | |
labels | jsonb | Metadata specific to the network. | |
name | text | Name of the network. | |
options | jsonb | Network specific options to use for when creating the network. | |
peers | jsonb | Peer nodes for an overlay network. | |
scope | text | Scope describes the level at which the network exists (e.g. 'swarm' for cluster-wide or 'local' for machine level). | |
services | jsonb | Services in the network. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- docker
You can pass the configuration to the command with the --config
argument:
steampipe_export_docker --config '<your_config>' docker_network