Skip to content

davescripts/docker-centos-7-apache-php-72-pdo-dblib-freetds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Docker Container: Centos7, Apache, PHP 7.2, and PDO DBLIB for SQL Server access

Dockerfile for a Container with Centos 7, Apache, PHP 7.2, and PDO DBLIB, for Web Development.

The PDO DBLIB extension, and the FreeTDS library, enable access to Microsoft SQL Server databases.

More details can be found here.


Build

Create Docker Image.

docker build -t <image_name> .

Replace <image_name> with the name you want for the image.


Example.

docker build -t image_apache .

Run

Create Docker Container.

docker run -tid -p 4000:80 --name=<container_name> -v /path_to/folder:/var/www/html <image_name>

Replace <container_name> with the name you want for the container, and <image_name> with the name of the image you specified on the Build command above.


Example.

docker run -tid -p 4000:80 --name=container_apache -v /path_to/folder:/var/www/html image_apache

Also change "/path_to/folder" with the actual location of your website's root folder on your local machine.


Test

Open the http://localhost:4000 url on your browser.