Docker image with PHP + APACHE + SQLSERVER DRIVERS
460
Source code available at https://github.com/hugocpolos/phpsqlserver
All images were built accordingly to the tutorial available at Linux and macOS Installation Tutorial for the Microsoft Drivers for PHP for SQL Server.
docker pull hugocpolos/php-sqlserver
docker run -p 8080:80 -v ${PWD}/<source_file_directory>:/var/www/html hugocpolos/php-sqlserver
For instance, with a local file tree as follow:
.
└── src
├── foo.php
└── index.php
The command would be:
docker run -p 8080:80 -v ${PWD}/src:/var/www/html hugocpolos/php-sqlserver
FROM hugocpolos/php-sqlserver
RUN echo "<?php phpinfo(); ?>" > /var/www/html/index.php
# or
ADD <dir_with_php_files> /var/www/html
For the file tree above, the Dockerfile would be:
FROM hugocpolos/php-sqlserver
ADD src /var/www/html
docker-compose.yml example file:
version: '3.0'
services:
php_sqlserver:
image: hugocpolos/php-sqlserver
ports:
- 8080:80
volumes:
- ./src:/var/www/html
Content type
Image
Digest
Size
149.4 MB
Last updated
about 5 years ago
docker pull hugocpolos/php-sqlserver