SQL Server LocalDB inside the docker container
Asked Answered
R

1

6

I need dockerized database that supports T-SQL and some other things of SQL Server. Of course, there is a container with SQL Server but it takes too much space. So I try to put SQL Server LocalDB (about 200mb) in a docker container.

It has silent mode of installation and can be easily installed. But the problem is how to access it from outside the container? (I need to access it from my local PC too) Is there any solution for this case? For now I have only one idea to implement some service for communication between SQL Server LocalDB and external connections then expose it near the db in the same container. Could you guys please advise something?

Rebuild answered 31/3, 2018 at 22:12 Comment(0)
G
8

Localdb only allows named pipes connections from the machine it is running on. You can use SQL Server Express, 400 MB, which allows TCP connections

Garnet answered 1/4, 2018 at 7:58 Comment(1)
And there is a docker image for SQL Express, provided by MS, here: hub.docker.com/r/microsoft/mssql-server-windows-expressLaburnum

© 2022 - 2024 — McMap. All rights reserved.