docker-provider 0.0.2 → 0.1.0
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 +25 -0
- data/Gemfile +7 -7
- data/Gemfile.lock +51 -40
- data/LICENSE.txt +1 -1
- data/README.md +130 -60
- data/Rakefile +6 -1
- data/boxes/dind/.gitignore +2 -0
- data/boxes/dind/Dockerfile +12 -0
- data/boxes/dind/README.md +10 -0
- data/boxes/{nginx → dind}/Vagrantfile.sample +2 -1
- data/boxes/{nginx → dind}/metadata.json +0 -0
- data/boxes/precise/Dockerfile +10 -9
- data/boxes/precise/Vagrantfile.sample +0 -1
- data/development/Vagrantfile +1 -9
- data/docker-provider.gemspec +1 -2
- data/example/Vagrantfile +11 -10
- data/lib/docker-provider.rb +2 -1
- data/lib/docker-provider/action.rb +17 -6
- data/lib/docker-provider/action/check_running.rb +1 -1
- data/lib/docker-provider/action/create.rb +14 -11
- data/lib/docker-provider/action/prepare_nfs_settings.rb +59 -0
- data/lib/docker-provider/action/prepare_nfs_valid_ids.rb +19 -0
- data/lib/docker-provider/config.rb +14 -7
- data/lib/docker-provider/driver.rb +30 -6
- data/lib/docker-provider/errors.rb +14 -0
- data/lib/docker-provider/plugin.rb +10 -3
- data/lib/docker-provider/provider.rb +1 -1
- data/lib/docker-provider/synced_folder.rb +20 -0
- data/lib/docker-provider/version.rb +1 -1
- data/locales/en.yml +13 -2
- data/spec/acceptance/provider/basic_spec.rb +94 -0
- data/spec/acceptance/provider/network_forwarded_port_spec.rb +29 -0
- data/spec/acceptance/provider/synced_folder_spec.rb +39 -0
- data/spec/acceptance/provisioner/chef_solo_spec.rb +37 -0
- data/spec/acceptance/provisioner/puppet_spec.rb +37 -0
- data/spec/acceptance/provisioner/shell_spec.rb +51 -0
- data/spec/acceptance/synced_folder/nfs_spec.rb +36 -0
- data/spec/unit/driver_spec.rb +70 -11
- data/vagrant-spec.config.rb +8 -0
- metadata +40 -29
- data/boxes/nginx/.gitignore +0 -1
- data/boxes/nginx/Dockerfile +0 -4
- data/boxes/nginx/README.md +0 -25
- data/boxes/nginx/start +0 -5
- data/lib/docker-provider/action/share_folders.rb +0 -63
- data/spec/acceptance/Vagrantfile +0 -25
- data/spec/acceptance/vagrant_ssh.bats +0 -34
- data/spec/acceptance/vagrant_up.bats +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd2b96a22d7601dc0d40ebf0c15e7a609b9a7936
|
4
|
+
data.tar.gz: 5f2d19fb42756d513dfab0c10c62487230d42c66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af80b4c0dc7eb16a30f9188604eb05376bebc308be091d6b26872f9be1ef2290036baf173acfaadd0df6389c4d22182f22ca5bca3eb416f99210d33b8bb13105
|
7
|
+
data.tar.gz: e3dfb68c443d0604b52c0810a15fa456e69a0678d9dab3da4da2a000c544573a1ab005c8b649d8dd0e8224a11fb734a4017636a63afed70e7e3901e2b245e2e4
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,28 @@
|
|
1
|
+
## [0.1.0](https://github.com/fgrehm/docker-provider/compare/v0.0.2...0.1.0) (Feb 27, 2014)
|
2
|
+
|
3
|
+
BACKWARDS INCOMPATIBILITY:
|
4
|
+
|
5
|
+
- Support for Vagrant < 1.4 and Docker < 0.7.0 are gone, please use a previous
|
6
|
+
plugin version if you can't upgrade.
|
7
|
+
|
8
|
+
FEATURES:
|
9
|
+
|
10
|
+
- Trusted build for official base boxes Docker images [GH-5]
|
11
|
+
- New base boxes / images for running Ubuntu 12.04 in "machine mode"
|
12
|
+
- New [dind](https://github.com/jpetazzo/dind) Ubuntu 12.04 base box
|
13
|
+
- Support for NFS Synced Folders
|
14
|
+
- Support for running privileged containers
|
15
|
+
|
16
|
+
IMPROVEMENTS:
|
17
|
+
|
18
|
+
- Decrease timeout taken before killing a container on `vagrant halt`s
|
19
|
+
- Remove volumes along with containers with `docker rm -v` on `vagrant destroy`s
|
20
|
+
- Sanity checks using [vagrant-spec](https://github.com/mitchellh/vagrant-spec)
|
21
|
+
|
22
|
+
BUG FIXES:
|
23
|
+
|
24
|
+
- Fix `vagrant up` failure with newer Vagrant and Docker versions.
|
25
|
+
|
1
26
|
## [0.0.2](https://github.com/fgrehm/docker-provider/compare/v0.0.1...v0.0.2) (November 5, 2013)
|
2
27
|
|
3
28
|
- Fix provisioning with Vagrant's built in provisioners
|
data/Gemfile
CHANGED
@@ -4,7 +4,8 @@ source 'https://rubygems.org'
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
group :development, :test do
|
7
|
-
gem 'vagrant',
|
7
|
+
gem 'vagrant', github: 'mitchellh/vagrant', tag: 'v1.4.3'
|
8
|
+
gem 'vagrant-spec', github: 'mitchellh/vagrant-spec', ref: 'fbd067bbe5e2a789bb2b29c38d1224cdd9386836'
|
8
9
|
end
|
9
10
|
|
10
11
|
group :development do
|
@@ -12,10 +13,9 @@ group :development do
|
|
12
13
|
gem 'guard-rspec'
|
13
14
|
gem 'rb-inotify'
|
14
15
|
|
15
|
-
gem 'vagrant-notify',
|
16
|
-
gem 'vagrant-cachier',
|
17
|
-
gem 'vagrant-pristine',
|
18
|
-
gem 'vagrant-lxc',
|
19
|
-
gem '
|
20
|
-
gem 'ventriloquist', github: 'fgrehm/ventriloquist'
|
16
|
+
gem 'vagrant-notify', github: 'fgrehm/vagrant-notify'
|
17
|
+
gem 'vagrant-cachier', github: 'fgrehm/vagrant-cachier'
|
18
|
+
gem 'vagrant-pristine', github: 'fgrehm/vagrant-pristine'
|
19
|
+
gem 'vagrant-lxc', github: 'fgrehm/vagrant-lxc'
|
20
|
+
gem 'ventriloquist', github: 'fgrehm/ventriloquist'
|
21
21
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,81 +1,91 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git://github.com/fgrehm/vagrant-cachier.git
|
3
|
-
revision:
|
3
|
+
revision: 2faa6615466f8d518893f5ba51b493b877d2efde
|
4
4
|
specs:
|
5
|
-
vagrant-cachier (0.
|
6
|
-
|
7
|
-
GIT
|
8
|
-
remote: git://github.com/fgrehm/vagrant-global-status.git
|
9
|
-
revision: a0295400a0e47756cbcb8f97ed9f4449b1fb6b56
|
10
|
-
specs:
|
11
|
-
vagrant-global-status (0.1.1)
|
5
|
+
vagrant-cachier (0.6.1.dev)
|
12
6
|
|
13
7
|
GIT
|
14
8
|
remote: git://github.com/fgrehm/vagrant-lxc.git
|
15
|
-
revision:
|
9
|
+
revision: 4a84d95ff26bf2d887b127765a9ae404899734f9
|
16
10
|
specs:
|
17
|
-
vagrant-lxc (0.
|
11
|
+
vagrant-lxc (0.8.1.dev)
|
18
12
|
|
19
13
|
GIT
|
20
14
|
remote: git://github.com/fgrehm/vagrant-notify.git
|
21
|
-
revision:
|
15
|
+
revision: 56cc81882a6ca0c74ad662c81fca8105a307782c
|
22
16
|
specs:
|
23
|
-
vagrant-notify (0.
|
17
|
+
vagrant-notify (0.4.1.dev)
|
24
18
|
|
25
19
|
GIT
|
26
20
|
remote: git://github.com/fgrehm/vagrant-pristine.git
|
27
|
-
revision:
|
21
|
+
revision: 503dbc47848c81d0fbfa6840491856f518d244a1
|
28
22
|
specs:
|
29
23
|
vagrant-pristine (0.3.0)
|
30
24
|
|
31
25
|
GIT
|
32
26
|
remote: git://github.com/fgrehm/ventriloquist.git
|
33
|
-
revision:
|
27
|
+
revision: 8f87f95e69f5dba6faf1b9b8c74ad51a0068d8b7
|
28
|
+
specs:
|
29
|
+
ventriloquist (0.4.2.dev)
|
30
|
+
vocker (~> 0.4.1)
|
31
|
+
|
32
|
+
GIT
|
33
|
+
remote: git://github.com/mitchellh/vagrant-spec.git
|
34
|
+
revision: fbd067bbe5e2a789bb2b29c38d1224cdd9386836
|
35
|
+
ref: fbd067bbe5e2a789bb2b29c38d1224cdd9386836
|
34
36
|
specs:
|
35
|
-
|
36
|
-
|
37
|
+
vagrant-spec (0.0.1)
|
38
|
+
childprocess (~> 0.3.7)
|
39
|
+
log4r (~> 1.1.9)
|
40
|
+
rspec (~> 2.14)
|
41
|
+
thor (~> 0.18.1)
|
37
42
|
|
38
43
|
GIT
|
39
44
|
remote: git://github.com/mitchellh/vagrant.git
|
40
|
-
revision:
|
45
|
+
revision: 4f0eb9504cc786d5a57a43814427e8eb35407a4c
|
46
|
+
tag: v1.4.3
|
41
47
|
specs:
|
42
|
-
vagrant (1.3
|
48
|
+
vagrant (1.4.3)
|
43
49
|
childprocess (~> 0.3.7)
|
44
50
|
erubis (~> 2.7.0)
|
45
51
|
i18n (~> 0.6.0)
|
46
52
|
log4r (~> 1.1.9)
|
47
53
|
net-scp (~> 1.1.0)
|
48
|
-
net-ssh (
|
54
|
+
net-ssh (>= 2.6.6, < 2.8.0)
|
49
55
|
|
50
56
|
PATH
|
51
57
|
remote: .
|
52
58
|
specs:
|
53
|
-
docker-provider (0.0
|
59
|
+
docker-provider (0.1.0)
|
54
60
|
|
55
61
|
GEM
|
56
62
|
remote: https://rubygems.org/
|
57
63
|
specs:
|
58
64
|
celluloid (0.15.2)
|
59
65
|
timers (~> 1.1.0)
|
66
|
+
celluloid-io (0.15.0)
|
67
|
+
celluloid (>= 0.15.0)
|
68
|
+
nio4r (>= 0.5.0)
|
60
69
|
childprocess (0.3.9)
|
61
70
|
ffi (~> 1.0, >= 1.0.11)
|
62
|
-
coderay (1.0
|
63
|
-
diff-lcs (1.2.
|
71
|
+
coderay (1.1.0)
|
72
|
+
diff-lcs (1.2.5)
|
64
73
|
erubis (2.7.0)
|
65
74
|
ffi (1.9.3)
|
66
75
|
formatador (0.2.4)
|
67
|
-
guard (2.
|
76
|
+
guard (2.5.1)
|
68
77
|
formatador (>= 0.2.4)
|
69
|
-
listen (~> 2.
|
78
|
+
listen (~> 2.6)
|
70
79
|
lumberjack (~> 1.0)
|
71
80
|
pry (>= 0.9.12)
|
72
81
|
thor (>= 0.18.1)
|
73
|
-
guard-rspec (4.
|
74
|
-
guard (
|
75
|
-
rspec (
|
76
|
-
i18n (0.6.
|
77
|
-
listen (2.
|
82
|
+
guard-rspec (4.2.7)
|
83
|
+
guard (~> 2.1)
|
84
|
+
rspec (>= 2.14, < 4.0)
|
85
|
+
i18n (0.6.9)
|
86
|
+
listen (2.6.1)
|
78
87
|
celluloid (>= 0.15.2)
|
88
|
+
celluloid-io (>= 0.15.0)
|
79
89
|
rb-fsevent (>= 0.9.3)
|
80
90
|
rb-inotify (>= 0.9)
|
81
91
|
log4r (1.1.10)
|
@@ -83,27 +93,28 @@ GEM
|
|
83
93
|
method_source (0.8.2)
|
84
94
|
net-scp (1.1.2)
|
85
95
|
net-ssh (>= 2.6.5)
|
86
|
-
net-ssh (2.
|
87
|
-
|
88
|
-
|
96
|
+
net-ssh (2.7.0)
|
97
|
+
nio4r (1.0.0)
|
98
|
+
pry (0.9.12.6)
|
99
|
+
coderay (~> 1.0)
|
89
100
|
method_source (~> 0.8)
|
90
101
|
slop (~> 3.4)
|
91
|
-
rake (10.1.
|
92
|
-
rb-fsevent (0.9.
|
93
|
-
rb-inotify (0.9.
|
102
|
+
rake (10.1.1)
|
103
|
+
rb-fsevent (0.9.4)
|
104
|
+
rb-inotify (0.9.3)
|
94
105
|
ffi (>= 0.5.0)
|
95
106
|
rspec (2.14.1)
|
96
107
|
rspec-core (~> 2.14.0)
|
97
108
|
rspec-expectations (~> 2.14.0)
|
98
109
|
rspec-mocks (~> 2.14.0)
|
99
110
|
rspec-core (2.14.7)
|
100
|
-
rspec-expectations (2.14.
|
111
|
+
rspec-expectations (2.14.5)
|
101
112
|
diff-lcs (>= 1.1.3, < 2.0)
|
102
|
-
rspec-mocks (2.14.
|
103
|
-
slop (3.4.
|
113
|
+
rspec-mocks (2.14.6)
|
114
|
+
slop (3.4.7)
|
104
115
|
thor (0.18.1)
|
105
116
|
timers (1.1.0)
|
106
|
-
vocker (0.
|
117
|
+
vocker (0.4.1)
|
107
118
|
|
108
119
|
PLATFORMS
|
109
120
|
ruby
|
@@ -118,8 +129,8 @@ DEPENDENCIES
|
|
118
129
|
rspec
|
119
130
|
vagrant!
|
120
131
|
vagrant-cachier!
|
121
|
-
vagrant-global-status!
|
122
132
|
vagrant-lxc!
|
123
133
|
vagrant-notify!
|
124
134
|
vagrant-pristine!
|
135
|
+
vagrant-spec!
|
125
136
|
ventriloquist!
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
# docker-provider
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
[](https://travis-ci.org/fgrehm/docker-provider) [](http://badge.fury.io/rb/docker-provider) [](https://www.gittip.com/fgrehm/)
|
4
|
+
|
5
|
+
A [Docker](http://www.docker.io/) provider for [Vagrant](http://www.vagrantup.com/)
|
6
|
+
1.4+.
|
5
7
|
|
6
8
|
|
7
9
|
## Warning
|
8
10
|
|
9
|
-
This is
|
10
|
-
worth of development / testing.
|
11
|
+
This is experimental, expect things to break.
|
11
12
|
|
12
13
|
|
13
14
|
## Requirements
|
14
15
|
|
15
|
-
* Vagrant 1.
|
16
|
-
* Docker 0.
|
16
|
+
* Vagrant 1.4+
|
17
|
+
* Docker 0.7.0+
|
17
18
|
|
18
19
|
|
19
20
|
## Features
|
@@ -22,75 +23,142 @@ worth of development / testing.
|
|
22
23
|
* Port forwarding
|
23
24
|
* Synced / shared folders support
|
24
25
|
* Set container hostnames from Vagrantfiles
|
25
|
-
* Provision Docker containers with any built-in Vagrant
|
26
|
+
* Provision Docker containers with any built-in Vagrant provisioner (as long as the container has a SSH server running)
|
27
|
+
|
28
|
+
You can see the plugin in action by watching the following asciicasts I published
|
29
|
+
prior to releasing 0.0.1:
|
30
|
+
|
31
|
+
* http://asciinema.org/a/6162
|
32
|
+
* http://asciinema.org/a/6177
|
26
33
|
|
27
34
|
|
28
35
|
## Getting started
|
29
36
|
|
30
|
-
If you are on a Mac / Windows machine, please fire up a x64 VM with Docker +
|
31
|
-
Vagrant installed or use [this Vagrantfile](https://gist.github.com/fgrehm/fc48fb51ec7df64439e4)
|
32
|
-
and follow the instructions from
|
37
|
+
If you are on a Mac / Windows machine, please fire up a x64 Linux VM with Docker +
|
38
|
+
Vagrant 1.4+ installed or use [this Vagrantfile](https://gist.github.com/fgrehm/fc48fb51ec7df64439e4)
|
39
|
+
and follow the instructions from within the VM.
|
33
40
|
|
34
|
-
|
35
|
-
|
36
|
-
|
41
|
+
_It is likely that the plugin works with [boot2docker](http://boot2docker.github.io/)
|
42
|
+
but I personally haven't tried that yet. If you are able to give it a go please
|
43
|
+
[let me know](https://github.com/fgrehm/docker-provider/issues/new)._
|
37
44
|
|
38
|
-
|
45
|
+
### Initial setup
|
46
|
+
|
47
|
+
_If you are trying things out from a Vagrant VM using the `Vagrantfile` gisted
|
48
|
+
above, you can skip to the next section_
|
49
|
+
|
50
|
+
The plugin requires Docker's executable to be available on current user's `PATH`
|
51
|
+
and that the current user has been added to the `docker` group since we are not
|
52
|
+
using `sudo` when interacting with Docker's CLI. For more information on setting
|
53
|
+
this up please check [this page](http://docs.docker.io/en/latest/installation/ubuntulinux/#giving-non-root-access).
|
54
|
+
|
55
|
+
### `vagrant up`
|
56
|
+
|
57
|
+
On its current state, the plugin is not "user friendly" and won't provide any kind
|
58
|
+
of feedback about the process of downloading Docker images, so before you add a
|
59
|
+
`docker-provider` [base box](http://docs.vagrantup.com/v2/boxes.html) it is recommended
|
60
|
+
that you `docker pull` the associated base box images prior to spinning up `docker-provider`
|
61
|
+
containers (otherwise you'll be staring at a blinking cursor without any progress
|
62
|
+
information for a while).
|
63
|
+
|
64
|
+
Assuming you have Vagrant 1.4+ and Docker 0.7.0+ installed just sing that same
|
39
65
|
old song:
|
40
66
|
|
41
|
-
```
|
67
|
+
```sh
|
42
68
|
vagrant plugin install docker-provider
|
43
|
-
|
44
|
-
vagrant
|
69
|
+
docker pull fgrehm/vagrant-ubuntu:precise
|
70
|
+
vagrant box add precise64 http://bit.ly/vagrant-docker-precise
|
71
|
+
vagrant init precise64
|
45
72
|
vagrant up --provider=docker
|
46
73
|
```
|
47
74
|
|
75
|
+
Under the hood, that base box will [configure](#configuration) `docker-provider`
|
76
|
+
to use the [`fgrehm/vagrant-ubuntu:precise`](https://index.docker.io/u/fgrehm/vagrant-ubuntu/)
|
77
|
+
image that approximates a standard Vagrant box (`vagrant` user, default SSH key,
|
78
|
+
etc.) and you should be good to go.
|
79
|
+
|
48
80
|
|
49
81
|
## Using custom images
|
50
82
|
|
51
83
|
If you want to use a custom Docker image without creating a Vagrant base box,
|
52
|
-
you can use a "dummy" box
|
53
|
-
|
54
|
-
```
|
55
|
-
vagrant box add dummy http://bit.ly/vagrant-docker-dummy
|
56
|
-
```
|
57
|
-
|
58
|
-
And configure things from your `Vagrantfile` like in [vagrant-digitalocean](https://github.com/smdahlen/vagrant-digitalocean#configure)
|
84
|
+
you can use a "dummy" box and configure things from your `Vagrantfile` like
|
85
|
+
in [vagrant-digitalocean](https://github.com/smdahlen/vagrant-digitalocean#configure)
|
59
86
|
or [vagrant-aws](https://github.com/mitchellh/vagrant-aws#quick-start):
|
60
87
|
|
61
88
|
```ruby
|
62
89
|
Vagrant.configure("2") do |config|
|
63
90
|
config.vm.box = "dummy"
|
91
|
+
config.vm.box_url = "http://bit.ly/vagrant-docker-dummy"
|
64
92
|
config.vm.provider :docker do |docker|
|
65
93
|
docker.image = "your/image:tag"
|
66
|
-
docker.cmd = ["/path/to/your", "command"]
|
67
94
|
end
|
68
95
|
end
|
69
96
|
```
|
70
97
|
|
71
98
|
|
72
|
-
##
|
99
|
+
## Configuration
|
73
100
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
hostnames will not be reconfigured on `vagrant reload`s if they have changed and
|
78
|
-
the plugin **_will not give you any kind of warning or message_**. For instance,
|
79
|
-
if you change your Puppet manifests / Chef cookbooks paths (which are shared /
|
80
|
-
synced folders under the hood), **_you'll need to start from scratch_**. Oh,
|
81
|
-
and forwarded ports automatic collision handling is **_not supported as well_**.
|
101
|
+
This provider exposes a few provider-specific configuration options
|
102
|
+
that are passed on to `docker run` under the hood when the container
|
103
|
+
is being created:
|
82
104
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
105
|
+
* `image` - Docker image to run (required)
|
106
|
+
* `privileged` - Give extended privileges to the container (defaults to false)
|
107
|
+
* `cmd` - An array of strings that makes up for the command to run the container (defaults to what has been set on your `Dockerfile` as `CMD` or `ENTRYPOINT`)
|
108
|
+
* `ports` - An array of strings that makes up for the mapped network ports
|
109
|
+
* `volumes` - An array of strings that makes up for the data volumes used by the container
|
87
110
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
111
|
+
These can be set like typical provider-specific configuration:
|
112
|
+
|
113
|
+
```ruby
|
114
|
+
Vagrant.configure("2") do |config|
|
115
|
+
# ... other stuff
|
116
|
+
|
117
|
+
config.vm.provider :docker do |docker|
|
118
|
+
docker.image = 'fgrehm/vagrant-ubuntu-dind:precise'
|
119
|
+
docker.privileged = true
|
120
|
+
docker.cmd = ['/dind', '/sbin/init']
|
121
|
+
|
122
|
+
docker.ports << '1234:22'
|
123
|
+
docker.volumes << '/var/lib/docker'
|
124
|
+
end
|
125
|
+
end
|
126
|
+
```
|
127
|
+
|
128
|
+
|
129
|
+
## Networks
|
130
|
+
|
131
|
+
Networking features in the form of `config.vm.network` are not supported with
|
132
|
+
`docker-provider` apart from [forwarded ports]().
|
133
|
+
If any of [`:private_network`](http://docs.vagrantup.com/v2/networking/private_network.html)
|
134
|
+
or [`:public_network`](http://docs.vagrantup.com/v2/networking/public_network.html)
|
135
|
+
are specified, Vagrant **won't** emit a warning.
|
136
|
+
|
137
|
+
The same applies to changes on forwarded ports after the container has been
|
138
|
+
created, Vagrant **won't** emit a warning to let you know that the ports specified
|
139
|
+
on your `Vagrantfile` differs from what has been passed on to `docker run` when
|
140
|
+
creating the container.
|
141
|
+
|
142
|
+
_At some point the plugin will emit warnings on the scenarios described above, but
|
143
|
+
not on its current state. Pull Requests are encouraged ;)_
|
144
|
+
|
145
|
+
|
146
|
+
## Synced Folders
|
147
|
+
|
148
|
+
There is support for synced folders on the form of [Docker volumes](http://docs.docker.io/en/latest/use/working_with_volumes/#mount-a-host-directory-as-a-container-volume)
|
149
|
+
but as with forwarded ports, you won't be able to change them after the container
|
150
|
+
has been created. [NFS](http://docs.vagrantup.com/v2/synced-folders/nfs.html)
|
151
|
+
synced folders are also supported (as long as you set the `privileged`
|
152
|
+
[config](#configuration) to true so that `docker-provider` can mount it on the
|
153
|
+
guest container) and are capable of being reconfigured between `vagrant reload`s
|
154
|
+
(different from Docker volumes).
|
155
|
+
|
156
|
+
This is good enough for all built-in Vagrant provisioners (shell,
|
157
|
+
chef, and puppet) to work!
|
158
|
+
|
159
|
+
_At some point the plugin will emit warnings when the configured `Vagrantfile`
|
160
|
+
synced folders / volumes differs from the ones used upon the container creation,
|
161
|
+
but not on its current state. Pull Requests are encouraged ;)_
|
94
162
|
|
95
163
|
|
96
164
|
## Box format
|
@@ -104,25 +172,29 @@ The box format is basically just the required `metadata.json` file along with a
|
|
104
172
|
for this provider.
|
105
173
|
|
106
174
|
|
107
|
-
##
|
175
|
+
## Available base boxes
|
108
176
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
177
|
+
| LINK | DESCRIPTION |
|
178
|
+
| --- | --- |
|
179
|
+
| http://bit.ly/vagrant-docker-precise | Ubuntu 12.04 Precise x86_64 with Puppet and Chef preinstalled and configured to run `/sbin/init` |
|
180
|
+
| http://bit.ly/vagrant-docker-precise-dind | Ubuntu 12.04 Precise x86_64 based on the box above and ready to run [DinD](https://github.com/jpetazzo/dind) |
|
113
181
|
|
114
|
-
On a side note, if you really need your Docker containers to behave like machines
|
115
|
-
with Vagrant and you can't get it to work that way like me, you might want to use
|
116
|
-
[vagrant-lxc](https://github.com/fgrehm/vagrant-lxc) as an alternative.
|
117
182
|
|
183
|
+
## Limitations
|
118
184
|
|
119
|
-
|
185
|
+
As explained on the [networks](#networks) and [synced folder](#synced-folders)
|
186
|
+
sections above, there are some "gotchas" when using the plugin that you need to have
|
187
|
+
in mind before you start to pull your hair out.
|
120
188
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
189
|
+
For instance, forwarded ports, synced folders and containers' hostnames will not be
|
190
|
+
reconfigured on `vagrant reload`s if they have changed and the plugin **_will not
|
191
|
+
give you any kind of warning or message_**. As an example, if you change your Puppet
|
192
|
+
manifests / Chef cookbooks paths (which are shared / synced folders under the hood),
|
193
|
+
**_you'll need to start from scratch_** (unless you make them NFS shared folders).
|
194
|
+
This is due to a limitation in Docker itself as we can't change those parameters
|
195
|
+
after the container has been created.
|
196
|
+
|
197
|
+
Forwarded ports automatic collision handling is **_not supported as well_**.
|
126
198
|
|
127
199
|
|
128
200
|
## Contributing
|
@@ -132,5 +204,3 @@ address available on my GitHub profile.
|
|
132
204
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
133
205
|
4. Push to the branch (`git push origin my-new-feature`)
|
134
206
|
5. Create new Pull Request
|
135
|
-
|
136
|
-
[](https://bitdeli.com/free "Bitdeli Badge")
|