pub struct ImageSource {
pub as_: Option<Vec<String>>,
pub from: ObjectReference,
pub paths: Option<Vec<ImageSourcePath>>,
pub pull_secret: Option<LocalObjectReference>,
}
Expand description
ImageSource is used to describe build source that will be extracted from an image or used during a multi stage build. A reference of type ImageStreamTag, ImageStreamImage or DockerImage may be used. A pull secret can be specified to pull the image from an external registry or override the default service account secret if pulling from the internal registry. Image sources can either be used to extract content from an image and place it into the build context along with the repository source, or used directly during a multi-stage container image build to allow content to be copied without overwriting the contents of the repository source (see the ‘paths’ and ‘as’ fields).
Fields§
§as_: Option<Vec<String>>
A list of image names that this source will be used in place of during a multi-stage container image build. For instance, a Dockerfile that uses “COPY –from=nginx:latest” will first check for an image source that has “nginx:latest” in this field before attempting to pull directly. If the Dockerfile does not reference an image source it is ignored. This field and paths may both be set, in which case the contents will be used twice.
from: ObjectReference
from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from.
paths: Option<Vec<ImageSourcePath>>
paths is a list of source and destination paths to copy from the image. This content will be copied into the build context prior to starting the build. If no paths are set, the build context will not be altered.
pull_secret: Option<LocalObjectReference>
pullSecret is a reference to a secret to be used to pull the image from a registry If the image is pulled from the OpenShift registry, this field does not need to be set.
Trait Implementations§
Source§impl Clone for ImageSource
impl Clone for ImageSource
Source§fn clone(&self) -> ImageSource
fn clone(&self) -> ImageSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more