Skip to content

Commit cf30d09

Browse files
committed
Merge pull request #30 from mrjoelkemp/docker
Docker support
2 parents 8bac744 + 0d95d07 commit cf30d09

4 files changed

Lines changed: 20 additions & 7 deletions

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM eboraas/apache-php

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,22 @@ This has, of course, crippled the tool a bit – as you can't run code that has
2020

2121
### Running it locally
2222

23+
#### Vagrant
24+
25+
If you use vagrant, you can `vagrant up` within the phpepl root. This will spawn a virtual machine serving phpepl
26+
at the `http://phpepl.dev` address.
27+
28+
You can also do `vagrant plugin install vagrant-hostsupdater` if you need to fetch the hostname from `/etc/hosts` or another host file.
29+
30+
#### Docker
31+
32+
If you use Docker, you can run `./docker-bootstrap` to start a container that serves the app using PHP5 and Apache.
33+
34+
To view the served app, visit the IP address of the host. Note, if you're using boot2docker, you need to visit the ip
35+
found via the `boot2dock ip` command.
36+
37+
#### Manually
38+
2339
To serve this application locally, you'll need any php-capable web server:
2440

2541
* Mac: [MAMP](http://www.mamp.info/en/index.html)
@@ -35,13 +51,6 @@ You can then point your web server to serve files from the `phpepl/` root folder
3551

3652
You'll then have free reign to execute any commands.
3753

38-
#### Vagrant
39-
40-
If you use vagrant, you can `vagrant up` within the phpepl root. This will spawn a virtual machine serving phpepl
41-
at the `http://phpepl.dev` address.
42-
43-
You can also do `vagrant plugin install vagrant-hostsupdater` if you need to fetch the hostname from `/etc/hosts` or another host file.
44-
4554
### Contact Me
4655

4756
If you hit any errors or if someone hacked the repl and it goes down, give

docker-bootstrap.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
docker run -p 80:80 -v $(pwd):/var/www/ -d eboraas/apache-php

vagrant-bootstrap.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)