Skip to content

Commit

Permalink
(CONT-24) docker_stack always redoploying
Browse files Browse the repository at this point in the history
Implementation of fix suggested by @grzleadams in the Github issue #848.
  • Loading branch information
david22swan committed Dec 1, 2022
1 parent 4c1dda4 commit a45009b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/puppet/provider/docker_compose/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def exists?
containers = docker([
'ps',
'--format',
"{{.Label \"com.docker.compose.service\"}}-{{.Image}}",
"'{{.Label \"com.docker.compose.service\"}}-{{.Image}}'",
'--filter',
"label=com.docker.compose.project=#{name}",
]).split("\n")
Expand All @@ -49,7 +49,7 @@ def exists?
counts = Hash[*compose_services.each.map { |key, array|
image = (array['image']) ? array['image'] : get_image(key, compose_services)
Puppet.info("Checking for compose service #{key} #{image}")
[key, compose_containers.count("#{key}-#{image}")]
[key, compose_containers.count("'#{key}-#{image}'")]
}.flatten]

# No containers found for the project
Expand Down

0 comments on commit a45009b

Please sign in to comment.