testcontainers-cpp 0.2.0
Native C++20 Testcontainers over the Docker Engine API
Loading...
Searching...
No Matches
testcontainers::ContainerInspect Struct Reference

The subset of GET /containers/{id}/json we currently care about. More...

#include <testcontainers/docker/ContainerSpec.hpp>

Public Attributes

std::string id
std::string name
std::string status
 State.Status ("running", "exited", …).
bool running = false
 State.Running.
bool tty = false
 Config.Tty (container created with a pseudo-TTY).
std::optional< std::int64_t > exit_code
 State.ExitCode (when not running).
std::optional< std::string > health_status
 State.Health.Status ("starting"/"healthy"/"unhealthy"); absent when the container has no healthcheck configured.
std::map< std::string, std::vector< PortBinding > > ports
 "6379/tcp" -> published host bindings (from NetworkSettings.Ports).
HostConfigInspect host_config
 The typed HostConfig knobs, echoed back (zero state when absent).

Detailed Description

The subset of GET /containers/{id}/json we currently care about.

Member Data Documentation

◆ id

std::string testcontainers::ContainerInspect::id

◆ name

std::string testcontainers::ContainerInspect::name

◆ status

std::string testcontainers::ContainerInspect::status

State.Status ("running", "exited", …).

◆ running

bool testcontainers::ContainerInspect::running = false

State.Running.

◆ tty

bool testcontainers::ContainerInspect::tty = false

Config.Tty (container created with a pseudo-TTY).

◆ exit_code

std::optional<std::int64_t> testcontainers::ContainerInspect::exit_code

State.ExitCode (when not running).

◆ health_status

std::optional<std::string> testcontainers::ContainerInspect::health_status

State.Health.Status ("starting"/"healthy"/"unhealthy"); absent when the container has no healthcheck configured.

◆ ports

std::map<std::string, std::vector<PortBinding> > testcontainers::ContainerInspect::ports

"6379/tcp" -> published host bindings (from NetworkSettings.Ports).

◆ host_config

HostConfigInspect testcontainers::ContainerInspect::host_config

The typed HostConfig knobs, echoed back (zero state when absent).