MSSQL in Docker: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Created page with "Set up Docker See https://hub.docker.com/r/microsoft/mssql-server-linux/ Then, docker pull microsoft/mssql-server-linux:latest docker run -e 'ACCEPT_EULA=Y' -e 'SA_PA..."
 
Brian Wilson (talk | contribs)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
Set up [[Docker]]
First, set up [[Docker]], then pull the SQL Server container, then run it.


See https://hub.docker.com/r/microsoft/mssql-server-linux/
I have a simple git repo called [https://github.com/Wildsong/docker-mssqlserver docker-mssqlserver] to do all of this now, for testing with Esri products.


Then,
See also https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-docker and
https://hub.docker.com/r/microsoft/mssql-server-linux/
 
Microsoft blog posting: https://blogs.technet.microsoft.com/dataplatforminsider/2017/05/17/sql-server-2017-on-linux-surpasses-1-million-docker-pulls-as-the-next-preview-version-rolls-out/
 
To take it for a spin you can do this


  docker pull microsoft/mssql-server-linux:latest
  docker pull microsoft/mssql-server-linux:latest
  docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d microsoft/mssql-server-linux
  docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD='''strong password'''' -p 1433:1433 -d microsoft/mssql-server-linux
 
If your server fails to start re-run it without the daemonize (-d) option; in my case I needed a more complicated password.


== Management ==
== Management ==
Line 13: Line 20:
[https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms here.]  
[https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms here.]  


Of course you have to make sure port 1433 on the server instance is accessible from the desktop.
Another good option is Visual Studio.
I suggest setting up a VPN tunnel.
 
The control commands run over port 1433.
 
[[Category: SQL]]

Latest revision as of 21:32, 28 September 2021

First, set up Docker, then pull the SQL Server container, then run it.

I have a simple git repo called docker-mssqlserver to do all of this now, for testing with Esri products.

See also https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-docker and https://hub.docker.com/r/microsoft/mssql-server-linux/

Microsoft blog posting: https://blogs.technet.microsoft.com/dataplatforminsider/2017/05/17/sql-server-2017-on-linux-surpasses-1-million-docker-pulls-as-the-next-preview-version-rolls-out/

To take it for a spin you can do this

docker pull microsoft/mssql-server-linux:latest
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=strong password' -p 1433:1433 -d microsoft/mssql-server-linux

If your server fails to start re-run it without the daemonize (-d) option; in my case I needed a more complicated password.

Management

You still need a Windows desktop to manage the server, but you download SQL Server Management Studio for free from here.

Another good option is Visual Studio.

The control commands run over port 1433.