Skip to content

Commit ba351a4

Browse files
committed
Add vagrant configuration
1 parent 3c3e5f4 commit ba351a4

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
vendor/
22
bin/
3-
composer.lock
3+
composer.lock
4+
.vagrant

README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,21 @@ Usage
4040

4141
See [the documentation](http://docker-php.readthedocs.org/en/latest/).
4242

43+
Using Vagrant
44+
-------------
45+
46+
The provisioning included does not run the `composer install` bit, so you'll have to do it yourself:
47+
48+
```
49+
$ vagrant up --provider=virtualbox
50+
$ vagrant ssh
51+
$ cd /vagrant; composer install --dev
52+
```
53+
4354
Unit Tests
4455
----------
4556

46-
Setup the test suite using [Composer](http://getcomposer.org/):
57+
Setup the test suite using [Composer](http://getcomposer.org/) if not already done:
4758

4859
```
4960
$ composer install --dev

Vagrantfile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
$script = <<SCRIPT
5+
locale-gen
6+
7+
apt-get update -y
8+
apt-get install -y apt-transport-https
9+
apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
10+
11+
echo "deb https://apt.dockerproject.org/repo debian-jessie main" > /etc/apt/sources.list.d/docker.list
12+
13+
apt-get update -y
14+
apt-get install -y docker-engine
15+
16+
usermod -G docker vagrant
17+
18+
apt-get install -y php5-cli php5-json
19+
20+
curl -sS https://getcomposer.org/installer | php
21+
mv composer.phar /usr/local/bin/composer
22+
SCRIPT
23+
24+
Vagrant.configure(2) do |config|
25+
config.vm.box = "debian/jessie64"
26+
config.vm.provision 'shell', inline: $script
27+
end

0 commit comments

Comments
 (0)