ContainerResourceOptions Class

Resource limits for a container.

public sealed class ContainerResourceOptions

Properties

NameDescription
CpuLimitGets or sets the number of CPUs the container may use.
MemoryLimitGets or sets the memory limit in bytes.
ReadOnlyRootFilesystemGets or sets a value indicating whether the container's root filesystem is read-only.
SharedMemorySizeGets or sets the size of /dev/shm, in bytes. null keeps the default of the runtime (64 MB for docker), which is too small for browsers and some databases.
UlimitsGets the resource limits (ulimit) of the processes of the container.

Gets or sets the number of CPUs the container may use.

public double? CpuLimit { get; set; }

Property value

double?

Gets or sets the memory limit in bytes.

public long? MemoryLimit { get; set; }

Property value

long?

ReadOnlyRootFilesystem

ContainerResourceOptions.cs

Gets or sets a value indicating whether the container's root filesystem is read-only.

public bool ReadOnlyRootFilesystem { get; set; }

Property value

bool

Gets or sets the size of /dev/shm, in bytes. null keeps the default of the runtime (64 MB for docker), which is too small for browsers and some databases.

public long? SharedMemorySize { get; set; }

Property value

long?

Gets the resource limits (ulimit) of the processes of the container.

public IList<ContainerUlimit> Ulimits { get; }