Skip to content

Commit

Permalink
Merge pull request #544 from runcom/stop-signal
Browse files Browse the repository at this point in the history
config: add StopSignal
  • Loading branch information
stevvooe authored Feb 22, 2017
2 parents 5d0d21c + 48248de commit a9b71de
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions schema/config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
"type": "null"
}
]
},
"StopSignal": {
"type": "string"
}
}
},
Expand Down
1 change: 1 addition & 0 deletions schema/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions specs-go/v1/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a9b71de

Please sign in to comment.