pub struct ContainerUpOptsBuilder<'a> { /* private fields */ }
Expand description
Builder for ContainerUpOpts
.
Implementations§
Source§impl<'a> ContainerUpOptsBuilder<'a>
impl<'a> ContainerUpOptsBuilder<'a>
Sourcepub fn args<VALUE: Into<Vec<&'a str>>>(&mut self, value: VALUE) -> &mut Self
pub fn args<VALUE: Into<Vec<&'a str>>>(&mut self, value: VALUE) -> &mut Self
Command to run instead of the container’s default command (e.g., [“go”, “run”, “main.go”]). If empty, the container’s default command is used.
Sourcepub fn expand<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn expand<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Replace “${VAR}” or “$VAR” in the args according to the current environment variables defined in the container (e.g. “/$VAR/foo”).
Sourcepub fn experimental_privileged_nesting<VALUE: Into<bool>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn experimental_privileged_nesting<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
Provides Dagger access to the executed command.
Sourcepub fn insecure_root_capabilities<VALUE: Into<bool>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn insecure_root_capabilities<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
Execute the command with all root capabilities. This is similar to running a command with “sudo” or executing “docker run” with the “–privileged” flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
Sourcepub fn no_init<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn no_init<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
If set, skip the automatic init process injected into containers by default. This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
Sourcepub fn ports<VALUE: Into<Vec<PortForward>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn ports<VALUE: Into<Vec<PortForward>>>( &mut self, value: VALUE, ) -> &mut Self
List of frontend/backend port mappings to forward. Frontend is the port accepting traffic on the host, backend is the service port.
Sourcepub fn random<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn random<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Bind each tunnel port to a random port on the host.
Sourcepub fn use_entrypoint<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn use_entrypoint<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
If the container has an entrypoint, prepend it to the args.
Sourcepub fn build(&self) -> Result<ContainerUpOpts<'a>, ContainerUpOptsBuilderError>
pub fn build(&self) -> Result<ContainerUpOpts<'a>, ContainerUpOptsBuilderError>
Trait Implementations§
Source§impl<'a> Clone for ContainerUpOptsBuilder<'a>
impl<'a> Clone for ContainerUpOptsBuilder<'a>
Source§fn clone(&self) -> ContainerUpOptsBuilder<'a>
fn clone(&self) -> ContainerUpOptsBuilder<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more