Mounts .mdf databases in a dockerized sql-server instance.
Important notes:
- database name will be based on .mdf file name.
- exepected log filename to follow mdf_file_name_log.ldf
example:
Data
| - foo_log.ldf
| - foo.mdf
will generate a database named Foo
The original article explained very well how to get up and running with a Dockerfile build, if you intend to go with that route I recomend you check them out.
$ docker-compose up
Wait for server to be brought up Open another shell and run:
$ make attach
Run your SQL Server MDF file inside a linux Docker Container The core of this repository was taken from the article. Changes consists in generalizing attach_db script and wrapping Dockerfile in a compose file.