docker-stack 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +2 -2
- data/lib/docker/stack/controller.rb +13 -9
- data/lib/docker/stack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e492af35d1ce50eaa5346aa56b90cec9b79f0567
|
4
|
+
data.tar.gz: 1c905f18ff4d3c95802434d940ff26dbc6cf1517
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c91d0f8a28881d050c8cffbeffc40b60f83c59debe277cb97f38ca060bd2eaa6a6333da671d241a4a5bc6d149444927aba2b70631f42e2abe00caef326241265
|
7
|
+
data.tar.gz: 424e6200e0f054ee9fb0189cbbf4d3bc22b3f3a85e9901690de122ea8c449195a7eec5c176cbe46816f0f3c97948dd53356849a9c7b1cd606a2a2aa28af93417
|
data/.rubocop.yml
CHANGED
@@ -25,11 +25,13 @@ module Docker
|
|
25
25
|
down(cleanup: true)
|
26
26
|
images = config['services'].values.map { |conf| conf['image'] }
|
27
27
|
images.each do |image_name|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
begin
|
29
|
+
image = ::Docker::Image.get(image_name)
|
30
|
+
result = image.remove(prune: true)
|
31
|
+
yield result if block_given?
|
32
|
+
rescue ::Docker::Error::NotFoundError
|
33
|
+
yield %{[{"Skipped":"#{image_name} (image not present)"}]}
|
34
|
+
end
|
33
35
|
end
|
34
36
|
::Docker::Image.prune
|
35
37
|
end
|
@@ -37,10 +39,12 @@ module Docker
|
|
37
39
|
def status
|
38
40
|
containers = dc.ps.map(&:id)
|
39
41
|
containers.map do |c|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
42
|
+
begin
|
43
|
+
container = Container.new(c)
|
44
|
+
container.to_h
|
45
|
+
rescue StandardError
|
46
|
+
{ id: c, service: 'unknown', status: 'unknown', started: 'unknown', running: 'unknown' }
|
47
|
+
end
|
44
48
|
end
|
45
49
|
end
|
46
50
|
|
data/lib/docker/stack/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-stack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Klein
|
@@ -273,7 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
273
273
|
version: '0'
|
274
274
|
requirements: []
|
275
275
|
rubyforge_project:
|
276
|
-
rubygems_version: 2.
|
276
|
+
rubygems_version: 2.6.14
|
277
277
|
signing_key:
|
278
278
|
specification_version: 4
|
279
279
|
summary: Support code and rake tasks for running Rails on top of Dockerized services.
|