PHP7.3 as base image with mssq, odbc and sqlsrv pre-configured.
534
Create a directory called configurations in /home/$USER directory.
Inside configurations, create a file called backend.conf
Paste the following content:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName dev.host.com
DocumentRoot /var/www/html/project_name/web
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/project_name/web>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
sudo su
docker pull sobhanthakur/php7.3-mssql
docker run -v /home/user/configurations:/etc/apache2/sites-available -v <path_to_project_dir_in_local_machine>:/var/www/html/<project_name> -p 8000:8000 --name php-mssql-container -d sobhanthakur/php7.3-mssql
docker ps -a
copy the container ID for the above container
docker exec -it <ContainerID> /bin/bash
cd /var/www/html/<project-dir>
composer install
provide environment variables / create parameters.yml
cd /etc/apache2/sites-available && a2ensite backend.conf
/etc/init.d/apache2 restart
exit
docker inspect <ContainerID>
Copy the IP Address.
vi /etc/hosts
Add following line:
<IP_Address> dev.host.com
/etc/init.d/apache2 restart
Go to the project directory in your local machine
php bin/console cache:clear --env=prod
chmod -R 777 var/cache/ var/logs/ var/sessions/
exit
Go to browser and type dev.host.com
Content type
Image
Digest
Size
508.6 MB
Last updated
over 5 years ago
docker pull sobhanthakur/php7.3-mssql