software containerization platform
Install https://download.docker.com/win/stable/InstallDocker.msi
an installer to quickly and easily install and setup a Docker environment
Install https://github.com/docker/toolbox/releases/tag/v1.12.5
This is an option. See http://www.windowscentral.com/how-install-bash-shell-command-line-windows-10
Download cmder included git. See http://cmder.net/
Mac user should comment out mssql volumes
vi docker/docker-compose.yml
...
mssql:
build:
context: mssql
ports:
- "11433:1433"
# volumes:
# - ./mssql/data:/var/opt/mssql/data
cd docker
docker-compose up -d
Connect local MSSQL Server and create database using mssql clients.
- http://dbeaver.jkiss.org/
- https://msdn.microsoft.com/en-us/library/mt238290.aspx
- http://www.heidisql.com/
Administrator Account
- ID: sa
- Password: Password1234
Sample Init
CREATE DATABASE testdb;
USE testuser;
CREATE LOGIN testuser WITH PASSWORD = 'TestUser1234';
CREATE USER testuser FOR LOGIN testdb;
ALTER SERVER ROLE sysadmin ADD MEMBER [testuser];
Clone Repository
git clone https://github.com/harryoh/docker-mssql-laravel.git
Connect to docker
cd docker-mssql-laravel/docker
docker exec -it docker_php_1 /bin/bash
Configure environment for Laravel
copy example env file to .env
cd www
cp .env.example .env
vi .env
change database configuration
...
DB_CONNECTION=sqlsrv
DB_HOST=mssql
DB_PORT=11433
DB_DATABASE=testdb
DB_USERNAME=testuser
DB_PASSWORD=TestUser1234
...
Generate Key
php artisan key:generate
Install third party libraries
$ composer install
Database Migration
$ php artisan migrate
(docker-compose should be running.)
Open 'http://localhost:8080'