Skip to content

marcelodeandrade/docker-php-sqlsrv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP-SQLSRV

Docker image to connect PHP with MSSQL using sqlsrv driver

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Pre-requisites

  • docker-ce

Prepare

Build:

$ docker build .

Run

Run up daemonized

docker run -d m91x/phpsqlrv

Check containers:

$ docker ps

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS       NAMES
0d149516d3ec        m91x/phpsqlrv       "/usr/sbin/apache2ct…"   7 seconds ago       Up 4 seconds        80/tcp       reverent_visvesvaraya

Access

SSH

docker-compose exec -i -t CONTAINER_ID bash 

Stop

docker stop CONTAINER_ID 

Using docker-compose

docker-compose.yml sample:

version: '2'
services:
  php:
    container_name: php
    image: m91x/phpsqlrv
    volumes:
    - "./:/app:delegated"
    ports:
    - 80:80
    - 443:443

  mssql:
    container_name: mssql
    image: microsoft/mssql-server-linux
    environment:
      - ACCEPT_EULA=Y
      - SA_PASSWORD=p@ssw0rd

About

Docker image to connect PHP with MSSQL using sqlsrv driver

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published