Welcome to the MSSQL-Config project repository! This project aims to provide a convenient and standardized way to configure and manage Microsoft SQL Server instances with Docker. I installed dependencies drivers for MSSQL on the container. Also, I used Apache as a webserver and a PHP code (QuickDbTest.php) for testing MSSQL Database.
API directory includes Apache configs as a webserver and a Dockerfile for installing MSSQL drivers to connect to the database. You can use Nginx instead of Apache as a websever.
DB directory includes config files for creating and configuring Microsoft SQL Server.
If you want to change the database name you should change db_example
on db/setup.sql
to your database name. On top of that you should change private const db
on QuickDbTest.php
to your database name.
On the other hand, to change the database password, you should change private const pass
on QuickDbTest.php
and SA_PASSWORD
on docker-compose.yml
.
OS: Linux all versions (Ubuntu recommended).
Install Docker and docker-compose on your machine.
git clone https://github.com/adel-bz/MSSQL-Config.git
cd MSSQL-Config
sudo bash launcher.sh
sudo docker-compose down -v
Write the below address on your browser:
http://127.0.0.1:4567/QuickDbTest.php
Or use the below command on your terminal:
curl http://127.0.0.1:4567/QuickDbTest.php
You must get a response like this:
<pre>
[
{
"congratulations": "Success!!!",
"stars": "1"
},
{
"congratulations": "You did it!!!",
"stars": "2"
}
]</pre>
https://hub.docker.com/_/microsoft-mssql-server
https://gist.github.com/xenogew/3440d323b00e1d661966f2b2ca3ef64a