diff --git a/config.md b/config.md index ae3c8adcf..f40e2be3b 100644 --- a/config.md +++ b/config.md @@ -124,6 +124,10 @@ Note: Any OPTIONAL field MAY also be set to null, which is equivalent to being a If there are no labels then this property MAY either be absent or an empty map. Implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unknown labels key. + - **StopSignal** *string*, OPTIONAL + + The field contains the system call signal that will be sent to the container to exit. The signal can be a signal name in the format `SIGNAME`, for instance `SIGKILL` or `SIGRTMIN+3`. + - **rootfs** *object*, REQUIRED The rootfs key references the layer content addresses used by the image. diff --git a/schema/config-schema.json b/schema/config-schema.json index dc1bb665e..15bccd04e 100644 --- a/schema/config-schema.json +++ b/schema/config-schema.json @@ -80,6 +80,9 @@ "type": "null" } ] + }, + "StopSignal": { + "type": "string" } } }, diff --git a/schema/config_test.go b/schema/config_test.go index f31d14117..9961e77b9 100644 --- a/schema/config_test.go +++ b/schema/config_test.go @@ -164,6 +164,7 @@ func TestConfig(t *testing.T) { "/var/job-result-data": {}, "/var/log/my-app-logs": {} }, + "StopSignal": "SIGKILL", "WorkingDir": "/home/alice", "Labels": { "com.example.project.git.url": "https://example.com/project.git", diff --git a/specs-go/v1/config.go b/specs-go/v1/config.go index ddbc58622..4d0c216e0 100644 --- a/specs-go/v1/config.go +++ b/specs-go/v1/config.go @@ -41,6 +41,9 @@ type ImageConfig struct { // Labels contains arbitrary metadata for the container. Labels map[string]string `json:"labels,omitempty"` + + // StopSignal contains the system call signal that will be sent to the container to exit. + StopSignal string `json:"StopSignal,omitempty"` } // RootFS describes a layer content addresses