Class ServiceContainerSpec
Service container/task specification.
Namespace: Neon.Docker
Assembly: Neon.Docker.dll
Syntax
public class ServiceContainerSpec
Properties
Args
Arguments to the command.
Declaration
public List<string> Args { get; set; }
Property Value
Type | Description |
---|---|
List<string> |
Command
The command to be run in the image.
Declaration
public List<string> Command { get; set; }
Property Value
Type | Description |
---|---|
List<string> |
Configs
Specifies the configs to be exposed to the service containers.
Declaration
public List<ServiceConfig> Configs { get; set; }
Property Value
Type | Description |
---|---|
List<ServiceConfig> |
DNSConfig
DNS resolver configuration.
Declaration
public ServiceDnsConfig DNSConfig { get; set; }
Property Value
Type | Description |
---|---|
ServiceDnsConfig |
Dir
The container working directory where commands will run.
Declaration
public string Dir { get; set; }
Property Value
Type | Description |
---|---|
string |
Env
Environment variables of the form VARIABLE=VALUE or VARIABLE to pass environment variables from the Docker host.
Declaration
public List<string> Env { get; set; }
Property Value
Type | Description |
---|---|
List<string> |
Groups
The list of additional groups that the command will run as.
Declaration
public List<string> Groups { get; set; }
Property Value
Type | Description |
---|---|
List<string> |
HealthCheck
Specifies how service container health check are to be performed.
Declaration
public ServiceHealthCheck HealthCheck { get; set; }
Property Value
Type | Description |
---|---|
ServiceHealthCheck |
Hostname
Hostname for the container.
Declaration
public string Hostname { get; set; }
Property Value
Type | Description |
---|---|
string |
Hosts
Lists the hostname/IP address mappings to add to the service container [/etc/hosts] file. Each entry is formatted like:
Declaration
public List<string> Hosts { get; set; }
Property Value
Type | Description |
---|---|
List<string> |
Image
The image used to provision the service container.
note
This may include the image's @sha256:... appended to the tag.
Declaration
public string Image { get; set; }
Property Value
Type | Description |
---|---|
string |
ImageWithoutSHA
Returns the Image without any SHA hash appended to the tag.
Declaration
public string ImageWithoutSHA { get; }
Property Value
Type | Description |
---|---|
string |
Isolation
Windows Only: Specifies the isolation technology to be used for the service containers.
Declaration
public ServiceIsolationMode Isolation { get; set; }
Property Value
Type | Description |
---|---|
ServiceIsolationMode |
Labels
The container labels formatted as LABEL=VALUE.
Declaration
public Dictionary<string, string> Labels { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, string> |
Mounts
Specifies file system mounts to be added to the service containers.
Declaration
public List<ServiceMount> Mounts { get; set; }
Property Value
Type | Description |
---|---|
List<ServiceMount> |
OpenStdin
Open STDIN.
Declaration
public bool OpenStdin { get; set; }
Property Value
Type | Description |
---|---|
bool |
Privileges
Security options for the container.
Declaration
public ServicePrivileges Privileges { get; set; }
Property Value
Type | Description |
---|---|
ServicePrivileges |
ReadOnly
Optionally mount the service container file system as read-only.
Declaration
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
bool |
Secrets
Specifies the secrets to be exposed to the service containers.
Declaration
public List<ServiceSecret> Secrets { get; set; }
Property Value
Type | Description |
---|---|
List<ServiceSecret> |
StopGracePeriod
Time to wait for a service container to stop gracefully before killing it forcefully (in nanoseconds).
Declaration
public long StopGracePeriod { get; set; }
Property Value
Type | Description |
---|---|
long |
StopSignal
Signal to be used to gracefully stop the service containers.
Declaration
public string StopSignal { get; set; }
Property Value
Type | Description |
---|---|
string |
TTY
Optionally create a pseudo TTY.
Declaration
public bool TTY { get; set; }
Property Value
Type | Description |
---|---|
bool |
User
The user within the container.
Declaration
public string User { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
Normalize()
Recursively ensures ensures that any null class or list related properties are replaced with instances with default values or empty lists.
Declaration
public void Normalize()