pub struct AdvancedBuildStep {Show 24 fields
pub context: Option<String>,
pub additional_contexts: ListOrMap,
pub dockerfile: Option<String>,
pub dockerfile_inline: Option<String>,
pub args: Option<ListOrMap>,
pub cache_from: Vec<String>,
pub cache_to: Vec<String>,
pub entitlements: BTreeSet<String>,
pub extra_hosts: Option<ExtraHosts>,
pub isolation: Option<String>,
pub labels: ListOrMap,
pub network: Option<String>,
pub no_cache: Option<bool>,
pub platforms: BTreeSet<String>,
pub privileged: Option<bool>,
pub provenance: Option<bool>,
pub pull: Option<bool>,
pub sbom: Option<bool>,
pub secrets: BTreeSet<ServiceConfigOrSecret>,
pub ssh: ListOrMap,
pub shm_size: Option<StringOrNum>,
pub tags: BTreeSet<String>,
pub target: Option<String>,
pub ulimits: BTreeMap<String, Ulimit>,
}Expand description
Specifies the build configuration for creating a container image from source, as defined in the Compose Build Specification.
Fields§
§context: Option<String>Defines either a path to a directory containing a Dockerfile, or a URL to a Git repository.
When the value supplied is a relative path, it is interpreted as relative to the project directory. Compose warns you about the absolute path used to define the build context as those prevent the Compose file from being portable.
See more: https://docs.docker.com/reference/compose-file/build/#context
additional_contexts: ListOrMapRequires: Docker Compose 2.17.0 and later
Defines a list of named contexts the image builder should use during image build. Can be a mapping or a list. See more: https://docs.docker.com/reference/compose-file/build/#additional_contexts
dockerfile: Option<String>Sets an alternate Dockerfile. A relative path is resolved from the build context. Compose warns you about the absolute path used to define the Dockerfile as it prevents Compose files from being portable.
When set, dockerfile_inline attribute is not allowed and Compose rejects any Compose file having both set.
dockerfile_inline: Option<String>Requires: Docker Compose 2.17.0 and later
dockerfile_inline defines the Dockerfile content as an inlined string in a Compose file. When set, the dockerfile attribute is not allowed and Compose rejects any Compose file having both set.
args: Option<ListOrMap>Define build arguments, that is Dockerfile ARG values.
Cache location syntax follows the global format [NAME|type=TYPE[,KEY=VALUE]]. Simple NAME is actually a shortcut notation for type=registry,ref=NAME.
See more: https://docs.docker.com/reference/compose-file/build/#args
cache_from: Vec<String>Defines a list of sources the image builder should use for cache resolution.
See more: https://docs.docker.com/reference/compose-file/build/#cache_from
cache_to: Vec<String>Defines a list of export locations to be used to share build cache with future builds.
Cache location syntax follows the global format [NAME|type=TYPE[,KEY=VALUE]]. Simple NAME is actually a shortcut notation for type=registry,ref=NAME.
See more: https://docs.docker.com/reference/compose-file/build/#cache_to
entitlements: BTreeSet<String>Requires: Docker Compose 2.27.1 and later
Defines extra privileged entitlements to be allowed during the build.
extra_hosts: Option<ExtraHosts>Adds hostname mappings at build-time. Use the same syntax as extra_hosts.
isolation: Option<String>Specifies a build’s container isolation technology. Supported values are platform specific.
labels: ListOrMapAdd metadata to the resulting image. Can be set either as an array or a map.
It’s recommended that you use reverse-DNS notation to prevent your labels from conflicting with other software.
network: Option<String>Network mode to use for the build. Options include ‘default’, ‘none’, ‘host’, or a network name.
See more: https://docs.docker.com/reference/compose-file/build/#network
no_cache: Option<bool>Disables image builder cache and enforces a full rebuild from source for all image layers. This only applies to layers declared in the Dockerfile, referenced images can be retrieved from local image store whenever tag has been updated on registry (see pull).
platforms: BTreeSet<String>Defines a list of target platforms.
See more: https://docs.docker.com/reference/compose-file/build/#platforms
privileged: Option<bool>Requires: Docker Compose 2.15.0 and later
Configures the service image to build with elevated privileges. Support and actual impacts are platform specific.
provenance: Option<bool>Requires: Docker Compose 2.39.0 and later
Configures the builder to add a provenance attestation to the published image.
The value can be either a boolean to enable/disable provenance attestation, or a key=value string to set provenance configuration. You can use this to select the level of detail to be included in the provenance attestation by setting the mode parameter.
pull: Option<bool>Requires the image builder to pull referenced images (FROM Dockerfile directive), even if those are already available in the local image store.
sbom: Option<bool>Requires: Docker Compose 2.39.0 and later
Configures the builder to add a provenance attestation to the published image.
See more: https://docs.docker.com/reference/compose-file/build/#sbom
secrets: BTreeSet<ServiceConfigOrSecret>Grants access to sensitive data defined by secrets on a per-service build basis.
See more: https://docs.docker.com/reference/compose-file/build/#secrets
ssh: ListOrMapSSH agent socket or keys to expose to the build. Format is either a string or a list of ‘default|
See more: https://docs.docker.com/reference/compose-file/build/#ssh
shm_size: Option<StringOrNum>Size of /dev/shm for the build container. A string value can use suffix like ‘2g’ for 2 gigabytes.
See more: https://docs.docker.com/reference/compose-file/build/#shm_size
Defines a list of tag mappings that must be associated to the build image. This list comes in addition to the image property defined in the service section.
target: Option<String>Defines the stage to build as defined inside a multi-stage Dockerfile.
ulimits: BTreeMap<String, Ulimit>Requires: Docker Compose 2.23.1 and later
ulimits overrides the default ulimits for a container. It’s specified either as an integer for a single limit or as mapping for soft/hard limits.
See more: https://docs.docker.com/reference/compose-file/build/#ulimits
Trait Implementations§
Source§impl Clone for AdvancedBuildStep
impl Clone for AdvancedBuildStep
Source§fn clone(&self) -> AdvancedBuildStep
fn clone(&self) -> AdvancedBuildStep
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AdvancedBuildStep
impl Debug for AdvancedBuildStep
Source§impl Default for AdvancedBuildStep
impl Default for AdvancedBuildStep
Source§fn default() -> AdvancedBuildStep
fn default() -> AdvancedBuildStep
Source§impl<'de> Deserialize<'de> for AdvancedBuildStepwhere
AdvancedBuildStep: Default,
impl<'de> Deserialize<'de> for AdvancedBuildStepwhere
AdvancedBuildStep: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for AdvancedBuildStep
impl PartialEq for AdvancedBuildStep
Source§impl Serialize for AdvancedBuildStep
impl Serialize for AdvancedBuildStep
impl Eq for AdvancedBuildStep
impl StructuralPartialEq for AdvancedBuildStep
Auto Trait Implementations§
impl Freeze for AdvancedBuildStep
impl RefUnwindSafe for AdvancedBuildStep
impl Send for AdvancedBuildStep
impl Sync for AdvancedBuildStep
impl Unpin for AdvancedBuildStep
impl UnsafeUnpin for AdvancedBuildStep
impl UnwindSafe for AdvancedBuildStep
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.