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

Options for POST /build — the knobs the Docker build endpoint accepts that we surface. More...

#include <testcontainers/docker/BuildOptions.hpp>

Public Attributes

std::string tag
 t= (e.g. "myimg:latest")
std::string dockerfile = "Dockerfile"
 dockerfile= (path within the context)
std::vector< std::pair< std::string, std::string > > build_args
 buildargs= (JSON-encoded map)
std::vector< std::pair< std::string, std::string > > labels
 labels= (JSON-encoded map): labels set on the BUILT IMAGE, merged with the Dockerfile's own LABEL instructions (on a duplicate key the query label wins, docker build --label parity).
std::string target
 target= (multi-stage target stage)
bool no_cache = false
 nocache=
bool pull = false
 pull= (always re-pull the base image)

Detailed Description

Options for POST /build — the knobs the Docker build endpoint accepts that we surface.

A plain, copyable value type (std only): the tar build context is supplied separately as the request body.

Member Data Documentation

◆ tag

std::string testcontainers::docker::BuildOptions::tag

t= (e.g. "myimg:latest")

◆ dockerfile

std::string testcontainers::docker::BuildOptions::dockerfile = "Dockerfile"

dockerfile= (path within the context)

◆ build_args

std::vector<std::pair<std::string, std::string> > testcontainers::docker::BuildOptions::build_args

buildargs= (JSON-encoded map)

◆ labels

std::vector<std::pair<std::string, std::string> > testcontainers::docker::BuildOptions::labels

labels= (JSON-encoded map): labels set on the BUILT IMAGE, merged with the Dockerfile's own LABEL instructions (on a duplicate key the query label wins, docker build --label parity).

◆ target

std::string testcontainers::docker::BuildOptions::target

target= (multi-stage target stage)

◆ no_cache

bool testcontainers::docker::BuildOptions::no_cache = false

nocache=

◆ pull

bool testcontainers::docker::BuildOptions::pull = false

pull= (always re-pull the base image)