vocker 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -4
- data/lib/vocker/docker_client.rb +7 -1
- data/lib/vocker/docker_installer.rb +3 -1
- data/lib/vocker/version.rb +1 -1
- data/locales/en.yml +3 -0
- data/spec/unit/docker_client_spec.rb +10 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c85ef7c68884d8019894cc7d582743749470350b
|
4
|
+
data.tar.gz: 8afc3a12d801e8a57b6906cf2033b70bd5df232c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60c268d5a0c91851e414f6eda5c88a057169288a3f90d312836ad5fea4868ea7d19cd8655ac25db35646839babd6585e115303dfee6adec9c507e7c909110c8d
|
7
|
+
data.tar.gz: d8dda39a64b9b09e2ee38534ee36259516825413cb3b9810b010300efb7adc08f8a8c8bac0a4c342be6f7c9eed1a980e974b2c63a12ee8499733f29b377ce7aa
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## [0.3.1](https://github.com/fgrehm/vocker/compare/v0.3.0...v0.3.1) (October 3, 2013)
|
2
|
+
|
3
|
+
- Check if container is running before trying to restart
|
4
|
+
- Configure automatic restart of containers regardless of Vagrant version
|
5
|
+
|
1
6
|
## [0.3.0](https://github.com/fgrehm/vocker/compare/v0.2.1...v0.3.0) (September 7, 2013)
|
2
7
|
|
3
8
|
- Add support for Docker's `-dns` parameter
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -26,8 +26,7 @@ vagrant plugin install vocker
|
|
26
26
|
|
27
27
|
## Status
|
28
28
|
|
29
|
-
Early development. It can be useful for trying out Docker and
|
30
|
-
but the feature set and configuration format might change rapidly.
|
29
|
+
Early development. It can be useful for trying out Docker and its growing "ecosystem" but the feature set and configuration format might change rapidly.
|
31
30
|
|
32
31
|
Apart from that I've only used the plugin on the following Ubuntu 13.04 VMs:
|
33
32
|
|
@@ -40,8 +39,7 @@ containers you need some extra steps described below_
|
|
40
39
|
|
41
40
|
## Usage
|
42
41
|
|
43
|
-
Currently Vocker can be used in three different ways: as a provisioner, as a command
|
44
|
-
and as a foundation for other Vagrant plugins.
|
42
|
+
Currently Vocker can be used in three different ways: as a provisioner, as a command and as a foundation for other Vagrant plugins.
|
45
43
|
|
46
44
|
### Provisioner
|
47
45
|
|
data/lib/vocker/docker_client.rb
CHANGED
@@ -46,7 +46,13 @@ module VagrantPlugins
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def start_container(id)
|
49
|
-
|
49
|
+
unless container_running?(id)
|
50
|
+
@machine.communicate.sudo("docker start #{id}")
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def container_running?(id)
|
55
|
+
@machine.communicate.test("sudo docker ps -q | grep #{id}")
|
50
56
|
end
|
51
57
|
|
52
58
|
def create_container(config)
|
@@ -25,8 +25,10 @@ module VagrantPlugins
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
if
|
28
|
+
if @machine.guest.capability?(:docker_configure_auto_start)
|
29
29
|
@machine.guest.capability(:docker_configure_auto_start)
|
30
|
+
else
|
31
|
+
@machine.env.ui.warn I18n.t('vagrant.docker_auto_start_not_available')
|
30
32
|
end
|
31
33
|
end
|
32
34
|
end
|
data/lib/vocker/version.rb
CHANGED
data/locales/en.yml
CHANGED
@@ -58,13 +58,20 @@ describe VagrantPlugins::Vocker::DockerClient do
|
|
58
58
|
|
59
59
|
context 'when the container already exists' do
|
60
60
|
before do
|
61
|
-
stub(communicator).test(with{|cmd| cmd =~ /docker ps/}) { true }
|
62
|
-
subject.run containers
|
61
|
+
stub(communicator).test(with{|cmd| cmd =~ /docker ps -a -q/}) { true }
|
63
62
|
end
|
64
63
|
|
65
|
-
it 'starts the container' do
|
64
|
+
it 'starts the container if it is stopped' do
|
65
|
+
stub(communicator).test(with{|cmd| cmd =~ /docker ps -q/}) { false }
|
66
|
+
subject.run containers
|
66
67
|
expect(communicator).to have_received.sudo(with{|cmd| cmd =~ /docker start/})
|
67
68
|
end
|
69
|
+
|
70
|
+
it 'noops if container is already running' do
|
71
|
+
stub(communicator).test(with{|cmd| cmd =~ /docker ps -q/}) { true }
|
72
|
+
subject.run containers
|
73
|
+
expect(communicator).to_not have_received.sudo(with{|cmd| cmd =~ /docker start/})
|
74
|
+
end
|
68
75
|
end
|
69
76
|
|
70
77
|
context 'when the container does not exist' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vocker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Rehm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|