pub struct Secret {
pub id: Option<String>,
pub target: Option<String>,
pub env: Option<String>,
pub required: Option<bool>,
pub mode: Option<String>,
pub uid: Option<u16>,
pub gid: Option<u16>,
}Expand description
This mount type allows the build container to access secret values, such as tokens or private keys, without baking them into the image. By default, the secret is mounted as a file. You can also mount the secret as an environment variable by setting the env option. See https://docs.docker.com/reference/dockerfile/#run—mounttypesecret
Fields§
§id: Option<String>ID of the secret. Defaults to basename of the target path.
target: Option<String>Mount the secret to the specified path. Defaults to /run/secrets/ + id if unset and if env is also unset.
env: Option<String>Mount the secret to an environment variable instead of a file, or both.
required: Option<bool>If set to true, the instruction errors out when the secret is unavailable. Defaults to false.
mode: Option<String>File mode for secret file in octal. Default 0400.
uid: Option<u16>User ID for secret file. Default 0.
gid: Option<u16>Group ID for secret file. Default 0.
Trait Implementations§
Source§impl From<SecretPatch> for Secret
impl From<SecretPatch> for Secret
Source§fn from(value: SecretPatch) -> Self
fn from(value: SecretPatch) -> Self
Source§impl Patch<SecretPatch> for Secret
impl Patch<SecretPatch> for Secret
Source§fn apply(&mut self, patch: SecretPatch)
fn apply(&mut self, patch: SecretPatch)
Source§fn into_patch(self) -> SecretPatch
fn into_patch(self) -> SecretPatch
SelfSource§fn into_patch_by_diff(self, previous_struct: Self) -> SecretPatch
fn into_patch_by_diff(self, previous_struct: Self) -> SecretPatch
previous_struct into SelfSource§fn new_empty_patch() -> SecretPatch
fn new_empty_patch() -> SecretPatch
impl StructuralPartialEq for Secret
Auto Trait Implementations§
impl Freeze for Secret
impl RefUnwindSafe for Secret
impl Send for Secret
impl Sync for Secret
impl Unpin for Secret
impl UnwindSafe for Secret
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)