Class: DockerEngineAPI::Models::ImageBuildParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- DockerEngineAPI::Models::ImageBuildParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/docker_engine_api/models/image_build_params.rb
Overview
Defined Under Namespace
Modules: Version
Instance Attribute Summary collapse
- #body ⇒ Pathname, ...
-
#buildargs ⇒ String?
JSON map of string pairs for build-time variables.
-
#cachefrom ⇒ String?
JSON array of images used for build cache resolution.
-
#cpuperiod ⇒ Integer?
The length of a CPU period in microseconds.
-
#cpuquota ⇒ Integer?
Microseconds of CPU time that the container can get in a CPU period.
-
#cpusetcpus ⇒ String?
CPUs in which to allow execution (e.g.,
0-3, ‘0,1`). -
#cpushares ⇒ Integer?
CPU shares (relative weight).
-
#dockerfile ⇒ String?
Path within the build context to the
Dockerfile. -
#extrahosts ⇒ String?
Extra hosts to add to /etc/hosts.
-
#forcerm ⇒ Boolean?
Always remove intermediate containers, even upon failure.
-
#labels ⇒ String?
Arbitrary key/value labels to set on the image, as a JSON map of string pairs.
-
#memory ⇒ Integer?
Set memory limit for build.
-
#memswap ⇒ Integer?
Total memory (memory + swap).
-
#networkmode ⇒ String?
Sets the networking mode for the run commands during build.
-
#nocache ⇒ Boolean?
Do not use the cache when building the image.
-
#outputs ⇒ String?
BuildKit output configuration in the format of a stringified JSON array of objects.
-
#platform ⇒ String?
Platform in the format os[/arch].
-
#pull ⇒ String?
Attempt to pull the image even if an older image exists locally.
-
#q ⇒ Boolean?
Suppress verbose build output.
-
#remote ⇒ String?
A Git repository URI or HTTP/HTTPS context URI.
-
#rm ⇒ Boolean?
Remove intermediate containers after a successful build.
-
#shmsize ⇒ Integer?
Size of
/dev/shmin bytes. -
#squash ⇒ Boolean?
Squash the resulting images layers into a single layer.
-
#t ⇒ String?
A name and optional tag to apply to the image in the
name:tagformat. -
#target ⇒ String?
Target build stage.
-
#version ⇒ Symbol, ...
Version of the builder backend to use.
- #x_registry_config ⇒ String?
Attributes included from Internal::Type::RequestParameters
Instance Method Summary collapse
-
#initialize(body:, buildargs: nil, cachefrom: nil, cpuperiod: nil, cpuquota: nil, cpusetcpus: nil, cpushares: nil, dockerfile: nil, extrahosts: nil, forcerm: nil, labels: nil, memory: nil, memswap: nil, networkmode: nil, nocache: nil, outputs: nil, platform: nil, pull: nil, q: nil, remote: nil, rm: nil, shmsize: nil, squash: nil, t: nil, target: nil, version: nil, x_registry_config: nil, request_options: {}) ⇒ Object
constructor
Some parameter documentations has been truncated, see ImageBuildParams for more details.
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(body:, buildargs: nil, cachefrom: nil, cpuperiod: nil, cpuquota: nil, cpusetcpus: nil, cpushares: nil, dockerfile: nil, extrahosts: nil, forcerm: nil, labels: nil, memory: nil, memswap: nil, networkmode: nil, nocache: nil, outputs: nil, platform: nil, pull: nil, q: nil, remote: nil, rm: nil, shmsize: nil, squash: nil, t: nil, target: nil, version: nil, x_registry_config: nil, request_options: {}) ⇒ Object
Some parameter documentations has been truncated, see DockerEngineAPI::Models::ImageBuildParams for more details.
o
|
|
# File 'lib/docker_engine_api/models/image_build_params.rb', line 206
|
Instance Attribute Details
#body ⇒ Pathname, ...
13 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 13 required :body, DockerEngineAPI::Internal::Type::FileInput |
#buildargs ⇒ String?
JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the Dockerfile RUN instruction, or for variable expansion in other Dockerfile instructions. This is not meant for passing secret values.
For example, the build arg ‘FOO=bar` would become `“FOO”:“bar”` in JSON. This would result in the query parameter `buildargs=“FOO”:“bar”`. Note that `“FOO”:“bar”` should be URI component encoded.
[Read more about the buildargs instruction.](docs.docker.com/engine/reference/builder/#arg)
28 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 28 optional :buildargs, String |
#cachefrom ⇒ String?
JSON array of images used for build cache resolution.
34 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 34 optional :cachefrom, String |
#cpuperiod ⇒ Integer?
The length of a CPU period in microseconds.
40 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 40 optional :cpuperiod, Integer |
#cpuquota ⇒ Integer?
Microseconds of CPU time that the container can get in a CPU period.
46 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 46 optional :cpuquota, Integer |
#cpusetcpus ⇒ String?
CPUs in which to allow execution (e.g., 0-3, ‘0,1`).
52 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 52 optional :cpusetcpus, String |
#cpushares ⇒ Integer?
CPU shares (relative weight).
58 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 58 optional :cpushares, Integer |
#dockerfile ⇒ String?
Path within the build context to the Dockerfile. This is ignored if remote is specified and points to an external Dockerfile.
65 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 65 optional :dockerfile, String |
#extrahosts ⇒ String?
Extra hosts to add to /etc/hosts
71 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 71 optional :extrahosts, String |
#forcerm ⇒ Boolean?
Always remove intermediate containers, even upon failure.
77 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 77 optional :forcerm, DockerEngineAPI::Internal::Type::Boolean |
#labels ⇒ String?
Arbitrary key/value labels to set on the image, as a JSON map of string pairs.
83 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 83 optional :labels, String |
#memory ⇒ Integer?
Set memory limit for build.
89 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 89 optional :memory, Integer |
#memswap ⇒ Integer?
Total memory (memory + swap). Set as -1 to disable swap.
95 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 95 optional :memswap, Integer |
#networkmode ⇒ String?
Sets the networking mode for the run commands during build. Supported standard values are: bridge, host, none, and ‘container:<name|id>`. Any other value is taken as a custom network’s name or ID to which this container should connect to.
104 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 104 optional :networkmode, String |
#nocache ⇒ Boolean?
Do not use the cache when building the image.
110 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 110 optional :nocache, DockerEngineAPI::Internal::Type::Boolean |
#outputs ⇒ String?
BuildKit output configuration in the format of a stringified JSON array of objects. Each object must have two top-level properties: Type and Attrs. The Type property must be set to ‘moby’. The Attrs property is a map of attributes for the BuildKit output configuration. See docs.docker.com/build/exporters/oci-docker/ for more information.
Example:
“‘
- “Type”:“moby”,“Attrs”:{“type”:“image”,“force-compression”:“true”,“compression”:“zstd”}
-
“‘
126 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 126 optional :outputs, String |
#platform ⇒ String?
Platform in the format os[/arch]
132 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 132 optional :platform, String |
#pull ⇒ String?
Attempt to pull the image even if an older image exists locally.
138 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 138 optional :pull, String |
#q ⇒ Boolean?
Suppress verbose build output.
144 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 144 optional :q, DockerEngineAPI::Internal::Type::Boolean |
#remote ⇒ String?
A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called Dockerfile and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the dockerfile parameter is also specified, there must be a file with the corresponding path inside the tarball.
155 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 155 optional :remote, String |
#rm ⇒ Boolean?
Remove intermediate containers after a successful build.
161 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 161 optional :rm, DockerEngineAPI::Internal::Type::Boolean |
#shmsize ⇒ Integer?
Size of /dev/shm in bytes. The size must be greater than 0. If omitted the system uses 64MB.
168 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 168 optional :shmsize, Integer |
#squash ⇒ Boolean?
Squash the resulting images layers into a single layer. _(Experimental release only.)_
175 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 175 optional :squash, DockerEngineAPI::Internal::Type::Boolean |
#t ⇒ String?
A name and optional tag to apply to the image in the name:tag format. If you omit the tag the default latest value is assumed. You can provide several t parameters.
183 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 183 optional :t, String |
#target ⇒ String?
Target build stage
189 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 189 optional :target, String |
#version ⇒ Symbol, ...
Version of the builder backend to use.
-
1is the first generation classic (deprecated) builder in the Docker daemon (default) -
2is [BuildKit](github.com/moby/buildkit)
199 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 199 optional :version, enum: -> { DockerEngineAPI::ImageBuildParams::Version } |
#x_registry_config ⇒ String?
204 |
# File 'lib/docker_engine_api/models/image_build_params.rb', line 204 optional :x_registry_config, String |