Skip to content

Commit

Permalink
Honour startedServices setting when executing docker-compose stop
Browse files Browse the repository at this point in the history
  • Loading branch information
HSZemi authored and augi committed Jan 9, 2018
1 parent e10be4e commit 686deee
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ class ComposeDown extends DefaultTask {
@TaskAction
void down() {
if (settings.stopContainers) {
settings.composeExecutor.execute('stop', '--timeout', settings.dockerComposeStopTimeout.getSeconds().toString())
settings.composeExecutor.execute('stop', '--timeout', settings.dockerComposeStopTimeout.getSeconds().toString(), *settings.startedServices)
if (settings.removeContainers) {
if (!settings.startedServices.empty) {
logger.warn("You have specified startedServices, but composeDown with removeContainers = true will " +
"stop and remove all services defined in your compose file.")
}
if (settings.composeExecutor.version >= VersionNumber.parse('1.6.0')) {
String[] args = ['down']
switch (settings.removeImages) {
Expand Down

0 comments on commit 686deee

Please sign in to comment.