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

The HostConfig subset echoed back by GET /containers/{id}/json — the typed create-side knobs, readable back so tests can assert a limit landed. More...

#include <testcontainers/docker/ContainerSpec.hpp>

Public Attributes

std::int64_t memory_bytes = 0
 Memory; 0 = unlimited.
std::int64_t shm_size_bytes = 0
 ShmSize; the daemon's 64 MiB default when unset.
std::int64_t nano_cpus = 0
 NanoCpus; 0 = no CPU limit.
std::string cpuset_cpus
 CpusetCpus; "" = not pinned.
std::optional< std::int64_t > pids_limit
 PidsLimit; absent when the daemon reports null (no limit; some daemon versions report 0 instead — both mean "no limit set").
RestartPolicy restart_policy
 RestartPolicy (Name "" or "no" = none).
std::vector< std::string > dns_servers
 Dns (null -> empty).
std::vector< std::string > dns_search
 DnsSearch (null -> empty).
std::vector< std::string > dns_options
 DnsOptions (null -> empty).
std::map< std::string, std::string > sysctls
 Sysctls (null -> empty).
std::vector< Devicedevices
 Devices (null -> empty).

Detailed Description

The HostConfig subset echoed back by GET /containers/{id}/json — the typed create-side knobs, readable back so tests can assert a limit landed.

Values are the daemon's echo verbatim: an unset knob reads as Docker's zero state (0 / "" / empty; note ShmSize echoes the daemon's 64 MiB default and RestartPolicy.Name echoes "no" on modern daemons).

Member Data Documentation

◆ memory_bytes

std::int64_t testcontainers::HostConfigInspect::memory_bytes = 0

Memory; 0 = unlimited.

◆ shm_size_bytes

std::int64_t testcontainers::HostConfigInspect::shm_size_bytes = 0

ShmSize; the daemon's 64 MiB default when unset.

◆ nano_cpus

std::int64_t testcontainers::HostConfigInspect::nano_cpus = 0

NanoCpus; 0 = no CPU limit.

◆ cpuset_cpus

std::string testcontainers::HostConfigInspect::cpuset_cpus

CpusetCpus; "" = not pinned.

◆ pids_limit

std::optional<std::int64_t> testcontainers::HostConfigInspect::pids_limit

PidsLimit; absent when the daemon reports null (no limit; some daemon versions report 0 instead — both mean "no limit set").

◆ restart_policy

RestartPolicy testcontainers::HostConfigInspect::restart_policy

RestartPolicy (Name "" or "no" = none).

◆ dns_servers

std::vector<std::string> testcontainers::HostConfigInspect::dns_servers

Dns (null -> empty).

◆ dns_search

std::vector<std::string> testcontainers::HostConfigInspect::dns_search

DnsSearch (null -> empty).

◆ dns_options

std::vector<std::string> testcontainers::HostConfigInspect::dns_options

DnsOptions (null -> empty).

◆ sysctls

std::map<std::string, std::string> testcontainers::HostConfigInspect::sysctls

Sysctls (null -> empty).

◆ devices

std::vector<Device> testcontainers::HostConfigInspect::devices

Devices (null -> empty).