pub struct ImageBuild<'a> {Show 26 fields
pub content_type: Option<&'a str>,
pub x_registry_config: Option<&'a str>,
pub dockerfile: Option<&'a str>,
pub t: Option<&'a str>,
pub extrahosts: Option<&'a str>,
pub remote: Option<&'a str>,
pub q: Option<bool>,
pub nocache: Option<bool>,
pub cachefrom: Option<&'a str>,
pub pull: Option<bool>,
pub rm: Option<bool>,
pub forcerm: Option<bool>,
pub memory: Option<i64>,
pub memswap: Option<i64>,
pub cpushares: Option<i64>,
pub cpusetcpus: Option<&'a str>,
pub cpuperiod: Option<i64>,
pub cpuquota: Option<i64>,
pub buildargs: Option<&'a str>,
pub shmsize: Option<i64>,
pub squash: Option<bool>,
pub labels: Option<&'a str>,
pub networkmode: Option<&'a str>,
pub platform: Option<&'a str>,
pub target: Option<&'a str>,
pub outputs: Option<&'a str>,
}
v5
only.Fields§
§content_type: Option<&'a str>
§x_registry_config: Option<&'a str>
§dockerfile: Option<&'a str>
Path within the build context to the Dockerfile
.
This is ignored if remote is specified and points to an external Dockerfile
.
t: Option<&'a str>
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.
extrahosts: Option<&'a str>
TBD Extra hosts to add to /etc/hosts (As of version 1.xx)
remote: Option<&'a str>
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. (As of version 1.xx)
q: Option<bool>
Suppress verbose build output
nocache: Option<bool>
Do not use the cache when building the image (As of version 1.xx)
cachefrom: Option<&'a str>
JSON array of images used to build cache resolution (As of version 1.xx)
pull: Option<bool>
Attempt to pull the image even if an older image exists locally (As of version 1.xx)
rm: Option<bool>
Remove intermediate containers after a successful build (As of version 1.xx)
forcerm: Option<bool>
Always remove intermediate containers, even upon failure (As of version 1.xx)
memory: Option<i64>
Memory is the upper limit (in bytes) on how much memory running containers can use (As of version 1.xx)
memswap: Option<i64>
MemorySwap limits the amount of memory and swap together (As of version 1.xx)
CPUShares (relative weight (As of version 1.xx)
cpusetcpus: Option<&'a str>
CPUSetCPUs in which to allow execution (0-3, 0,1) (As of version 1.xx)
cpuperiod: Option<i64>
CPUPeriod limits the CPU CFS (Completely Fair Scheduler) period (As of version 1.xx)
cpuquota: Option<i64>
CPUQuota limits the CPU CFS (Completely Fair Scheduler) quota (As of version 1.xx)
buildargs: Option<&'a str>
JSON map of string pairs denoting build-time variables.
For example, the build argument Foo
with the value of bar
would be encoded in JSON as ["Foo":"bar"]
.
For example, buildargs={“Foo”:“bar”}.
Note(s):
- This should not be used to pass secrets.
- The value of buildargs should be URI component encoded before being passed to the API.
(As of version 1.xx)
shmsize: Option<i64>
ShmSize is the “size” value to use when mounting an shmfs on the container’s /dev/shm directory. Default is 64MB (As of version 1.xx)
squash: Option<bool>
Silently ignored. Squash the resulting images layers into a single layer (As of version 1.xx)
labels: Option<&'a str>
JSON map of key, value pairs to set as labels on the new image (As of version 1.xx)
networkmode: Option<&'a str>
Sets the networking mode for the run commands during build. Supported standard values are:
bridge
limited to containers within a single host, port mapping required for external accesshost
no isolation between host and containers on this networknone
disable all networking for this container- container:
share networking with given container —All other values are assumed to be a custom network’s name (As of version 1.xx)
platform: Option<&'a str>
Platform format os[/arch[/variant]] (As of version 1.xx)
target: Option<&'a str>
Target build stage (As of version 1.xx)
outputs: Option<&'a str>
output configuration TBD (As of version 1.xx)