steampipe plugin install docker

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_ipv6
from
docker_compose_network;
select
name,
driver,
internal,
attachable,
enable_ipv6
from
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_ipv6
from
docker_compose_network
where
internal;
select
name,
driver,
internal,
attachable,
enable_ipv6
from
docker_compose_network
where
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_ipv6
from
docker_compose_network
where
attachable;
select
name,
driver,
internal,
attachable,
enable_ipv6
from
docker_compose_network
where
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_ipv6
from
docker_compose_network
where
enable_ipv6;
select
name,
driver,
internal,
attachable,
enable_ipv6
from
docker_compose_network
where
enable_ipv6 = 1;

Schema for docker_compose_network

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
attachablebooleanSpecifies if containers can be attached to the network.
drivertextDriver used for the network.
driver_optsjsonbDriver options for the network.
enable_ipv6booleanSpecifies if IPv6 is enabled for the network.
extensionsjsonbExtensions for the network configuration.
externaljsonbExternal network configuration.
internalbooleanSpecifies if the network is internal.
ipamjsonbIPAM (IP Address Management) configuration for the network.
labelsjsonbLabels for the network.
nametextName of the network.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe 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