Class LinuxSecurityContext.Builder
- java.lang.Object
-
- com.oracle.bmc.containerinstances.model.LinuxSecurityContext.Builder
-
- Enclosing class:
- LinuxSecurityContext
public static class LinuxSecurityContext.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinuxSecurityContext
build()
LinuxSecurityContext.Builder
capabilities(ContainerCapabilities capabilities)
LinuxSecurityContext.Builder
copy(LinuxSecurityContext model)
LinuxSecurityContext.Builder
isNonRootUserCheckEnabled(Boolean isNonRootUserCheckEnabled)
Indicates if the container must run as a non-root user.LinuxSecurityContext.Builder
isRootFileSystemReadonly(Boolean isRootFileSystemReadonly)
Determines if the container will have a read-only root file system.LinuxSecurityContext.Builder
runAsGroup(Integer runAsGroup)
The group ID (GID) to run the entrypoint process of the container.LinuxSecurityContext.Builder
runAsUser(Integer runAsUser)
The user ID (UID) to run the entrypoint process of the container.
-
-
-
Method Detail
-
runAsUser
public LinuxSecurityContext.Builder runAsUser(Integer runAsUser)
The user ID (UID) to run the entrypoint process of the container.Defaults to user specified UID in container image metadata if not provided. This must be provided if runAsGroup is provided.
- Parameters:
runAsUser
- the value to set- Returns:
- this builder
-
runAsGroup
public LinuxSecurityContext.Builder runAsGroup(Integer runAsGroup)
The group ID (GID) to run the entrypoint process of the container.Uses runtime default if not provided.
- Parameters:
runAsGroup
- the value to set- Returns:
- this builder
-
isNonRootUserCheckEnabled
public LinuxSecurityContext.Builder isNonRootUserCheckEnabled(Boolean isNonRootUserCheckEnabled)
Indicates if the container must run as a non-root user.If true, the service validates the container image at runtime to ensure that it is not going to run with UID 0 (root) and fails the container instance creation if the validation fails.
- Parameters:
isNonRootUserCheckEnabled
- the value to set- Returns:
- this builder
-
isRootFileSystemReadonly
public LinuxSecurityContext.Builder isRootFileSystemReadonly(Boolean isRootFileSystemReadonly)
Determines if the container will have a read-only root file system.Default value is false.
- Parameters:
isRootFileSystemReadonly
- the value to set- Returns:
- this builder
-
capabilities
public LinuxSecurityContext.Builder capabilities(ContainerCapabilities capabilities)
-
build
public LinuxSecurityContext build()
-
copy
public LinuxSecurityContext.Builder copy(LinuxSecurityContext model)
-
-