Table: docker_compose_network - Query Docker Compose Networks using SQL
Docker Compose is a tool that allows developers to define and manage multi-container Docker applications. It utilizes YAML files to configure application services and performs the creation and start-up process of all the containers with a single command. Docker Compose Networks are part of this configuration, allowing for the interconnection of containers within the application.
Table Usage Guide
The docker_compose_network
table provides insights into the network configurations within Docker Compose. As a DevOps engineer, explore network-specific details through this table, including network names, drivers, and attached services. Utilize it to uncover information about network configurations, such as those with custom drivers, the interconnection between services, and the verification of network scopes.
Examples
Basic info
Explore which Docker networks are attachable and whether they have IPv6 enabled. This allows you to assess your network settings and make necessary adjustments for optimal performance and security.
select name, driver, internal, attachable, enable_ipv6from docker_compose_network;
select name, driver, internal, attachable, enable_ipv6from docker_compose_network;
List internal networks
Analyze the settings to understand the internal networks within your Docker Compose setup, particularly focusing on those that are attachable and have IPv6 enabled. This can be useful for managing network configurations and ensuring optimal performance and security.
select name, driver, internal, attachable, enable_ipv6from docker_compose_networkwhere internal;
select name, driver, internal, attachable, enable_ipv6from docker_compose_networkwhere internal = 1;
List attachable networks
Discover the segments that have attachable networks within your Docker Compose setup. This can help you understand which networks allow dynamic attachment of services, aiding in efficient resource allocation and network management.
select name, driver, internal, attachable, enable_ipv6from docker_compose_networkwhere attachable;
select name, driver, internal, attachable, enable_ipv6from docker_compose_networkwhere attachable = 1;
List networks where IPv6 is enabled
Discover the segments of your network where IPv6 is activated. This can be useful to understand where potential compatibility or security issues may arise due to the use of this protocol.
select name, driver, internal, attachable, enable_ipv6from docker_compose_networkwhere enable_ipv6;
select name, driver, internal, attachable, enable_ipv6from docker_compose_networkwhere enable_ipv6 = 1;
Schema for docker_compose_network
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
attachable | boolean | Specifies if containers can be attached to the network. | |
driver | text | Driver used for the network. | |
driver_opts | jsonb | Driver options for the network. | |
enable_ipv6 | boolean | Specifies if IPv6 is enabled for the network. | |
extensions | jsonb | Extensions for the network configuration. | |
external | jsonb | External network configuration. | |
internal | boolean | Specifies if the network is internal. | |
ipam | jsonb | IPAM (IP Address Management) configuration for the network. | |
labels | jsonb | Labels for the network. | |
name | text | Name of 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_compose_network