The tag servercore-10.0.19042.867 is the version of the windows servercore used as base to build the image.
In this example of docker-compose, note that host's folder ./c_database is mapped to container folder c:/database. The mdf and ldf files being attached to the server are expected to be found in host's folder ./c_database.
If new databases are created in the server, make sure the physical files are placed in container's folder c:/database, which is the one mapped to host's folder. Other wise the new databases will die with the repo.
version: '3.8'
services:
sqlserver:
image: bustroker/mssql-server-windows-developer-2019:servercore-10.0.19042.867
environment:
- SA_PASSWORD=Password_01
- ACCEPT_EULA=Y
- attach_dbs=[{'dbName':'FooDb','dbFiles':['C:\\Database\\FooDb.mdf','C:\\Database\\FooDb.ldf']}, {'dbName':'BarDb','dbFiles':['C:\\Database\\BarDb.mdf','C:\\Database\\BarDb.ldf']}]
ports:
- '1433:1433'
volumes:
- ./c_database:c:/Database
The attach_dbs variable is optional.
The SA_PASSWORD variable is the password for account sa.
Here are the details of how the image was built (Dockerfile, scripts...). However, the sqlpackage tool is not included in this image.
Content type
Image
Digest
Size
5.2 GB
Last updated
over 5 years ago
docker pull bustroker/mssql-server-windows-developer-2019:servercore-10.0.19042.867