Skip to content

Commit

Permalink
Filter out technical names when loading the current container resource.
Browse files Browse the repository at this point in the history
  • Loading branch information
jperville committed Aug 29, 2014
1 parent cac59af commit 50b73cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions providers/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ def docker_containers
end
ps[name.to_s] = line[start..finish - 1].strip
end
# Filter out technical names (eg. 'my-app/db'), which appear in ps['names']
# when a container has at least another container linking to it. If these
# names are not filtered they will pollute current_resource.container_name.
ps['names'] = ps['names'].split(',').grep( /\A[^\/]+\Z/ ).join(',') # technical names always contain a '/'
ps
end
end
Expand Down

0 comments on commit 50b73cc

Please sign in to comment.