Docker-Install php7 apache server
Oct 5, 2018
Step1 Create docker
docker run --name [Container name] -d -p [Port]:80 -v [physical path]:/var/www/html gjuniioor/php-sqlsrv:7.0
Ex
docker run --name php7 -d -p 8090:80 -v /Users/thanaroj/www:/var/www/html gjuniioor/php-sqlsrv:7.0
Step2 add mod_rewrite
docker exec -it php7 basha2enmod rewrite
Step3 install editor
apt-get update
apt-get install nano
Step4 edit file 000-default
nano /etc/apache2/sites-enabled/000-default.conf
add in file
<Directory /var/www/html/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all</Directory>
Step5 install curl
apt install libapache2-mod-php php-curl //select 2. keep local
Step6 Edit php.ini
nano /etc/php/7.0/cli/php.ini
add in file
extension=php_curl.dll
Step7 Install GD
apt-get update
apt-get install php7.0-gd php7.0
Step8 Ldap
apt-get update
apt-get install php7.0-ldap
**file adldap.php ต้องเป็นตัวเล็ก
Step9 Restart
sudo apache2ctl configtest
systemctl enable apache2.service
service apache2 restart
docker start php