-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
25 lines (20 loc) · 919 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
IMAGE := shouldbee/php
build:
sudo docker build -t $(IMAGE) .
clean:
sudo docker ps -aq | xargs sudo docker rm -f
run:
sudo docker run -d --name php --net=host -v /vagrant:/vagrant -e DOCUMENT_ROOT=/vagrant/public $(IMAGE)
test:
sudo docker run --rm $(IMAGE) php -v | grep 'PHP 5.5.9'
sudo docker run --rm $(IMAGE) php -m | grep mbstring
sudo docker run --rm $(IMAGE) php -m | grep mysql
sudo docker run --rm $(IMAGE) php -m | grep curl
sudo docker run --rm $(IMAGE) php -m | grep gd
sudo docker run --rm -v /vagrant:/vagrant $(IMAGE) php /vagrant/php/test.php
sudo docker run --rm $(IMAGE) test -d /var/log/php
sudo docker rm -f http || true
sudo docker run -d -i -t --name http -v /vagrant:/vagrant --net host -e DOCUMENT_ROOT=/vagrant/public $(IMAGE)
wget --retry-connrefused --content-on-error localhost/test.php -qO -
curl -s -I localhost | grep -P '^Server: Apache\r$$'
sudo docker rm -f http