Skip to content

Commit 48248de

Browse files
committed
config: add StopSignal
Signed-off-by: Antonio Murdaca <[email protected]>
1 parent a125828 commit 48248de

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

config.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ Note: Any OPTIONAL field MAY also be set to null, which is equivalent to being a
124124
If there are no labels then this property MAY either be absent or an empty map.
125125
Implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unknown labels key.
126126

127+
- **StopSignal** *string*, OPTIONAL
128+
129+
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`.
130+
127131
- **rootfs** *object*, REQUIRED
128132

129133
The rootfs key references the layer content addresses used by the image.

schema/config-schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
"type": "null"
8181
}
8282
]
83+
},
84+
"StopSignal": {
85+
"type": "string"
8386
}
8487
}
8588
},

schema/config_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ func TestConfig(t *testing.T) {
164164
"/var/job-result-data": {},
165165
"/var/log/my-app-logs": {}
166166
},
167+
"StopSignal": "SIGKILL",
167168
"WorkingDir": "/home/alice",
168169
"Labels": {
169170
"com.example.project.git.url": "https://example.com/project.git",

specs-go/v1/config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ type ImageConfig struct {
4141

4242
// Labels contains arbitrary metadata for the container.
4343
Labels map[string]string `json:"labels,omitempty"`
44+
45+
// StopSignal contains the system call signal that will be sent to the container to exit.
46+
StopSignal string `json:"StopSignal,omitempty"`
4447
}
4548

4649
// RootFS describes a layer content addresses

0 commit comments

Comments
 (0)