Sign inSign up

paulbuer/sqlserver

By paulbuer

Updated over 3 years ago

SQL Server 2019 (+ .NET Runtime 4.8) for Windows/WinServer

Image
0

634

paulbuer/sqlserver repository overview

Set the environment variables prior to running the container:

  1. ACCEPT_EULA:   <'Y'>
    Confirms acceptance of the end user licensing agreement.

  2. sa_password:   <Your-Password>
    Sets the sa password and enables the sa (system admin) login.

  3. attach_dbs:   [optional]
    The configuration for attaching custom DBs (.mdf, .ldf files).
    This should be a JSON string, in the following format (note the use of SINGLE quotes):
    [
      { 'dbName': 'SampleDb1', 'dbFiles': ['C:\temp\dbtest1.mdf', 'C:\temp\dbtest1_log.ldf'] },
      { 'dbName': 'SampleDb2', 'dbFiles': ['C:\temp\dbtest2.mdf', 'C:\temp\dbtest2_log.ldf'] }
    ]
    **This is an array of databases, which can have zero to N databases. Each consisting of:
      dbName: The name of the database
      dbFiles: An array of one or many absolute paths to the .MDF and .LDF files.

Sample run showing some parameters in action (bracketed ones can be skipped):

### docker network create -d nat --ipam-driver default --subnet 172.28.0.0/24 --gateway 172.28.0.1 <networkname> 

# SQL Server 2019 + .NET Runtime 4.8 (Windows) 
docker run -d --restart unless-stopped [--network <networkname>] [--ip <assign-ip>] --isolation=hyperv [-v C:\temp:C:\temp] [-w C:\] -e ACCEPT_EULA=Y -e sa_password=<Your-Password> [-e attach_dbs="[{'dbName':'SampleDb1','dbFiles':['C:\\temp\\dbtest1.mdf','C:\\temp\\dbtest1_log.ldf']}]"] --name sqlserver2019-withdotnet4.8-windows paulbuer/sqlserver:2019-withdotnet4.8-windows

# SQL Server 2019 (Windows) 
docker run -d --restart unless-stopped [--network <networkname>] [--ip <assign-ip>] --isolation=hyperv [-v C:\temp:C:\temp] [-w C:\] -e ACCEPT_EULA=Y -e sa_password=<Your-Password> [-e attach_dbs="[{'dbName':'SampleDb1','dbFiles':['C:\\temp\\dbtest1.mdf','C:\\temp\\dbtest1_log.ldf']}]"] --name sqlserver2019-windows paulbuer/sqlserver:2019-windows

# SQL Server 2019 + .NET Runtime 4.8 (WinServer) 
docker run -d --restart unless-stopped [--network <networkname>] [--ip <assign-ip>] [-v C:\temp:C:\temp] [-w C:\] -e ACCEPT_EULA=Y -e sa_password=<Your-Password> [-e attach_dbs="[{'dbName':'SampleDb1','dbFiles':['C:\\temp\\dbtest1.mdf','C:\\temp\\dbtest1_log.ldf']}]"] --name sqlserver2019-withdotnet4.8-winserver paulbuer/sqlserver:2019-withdotnet4.8-winserver

# SQL Server 2019 (WinServer) 
docker run -d --restart unless-stopped [--network <networkname>] [--ip <assign-ip>] [-v C:\temp:C:\temp] [-w C:\] -e ACCEPT_EULA=Y -e sa_password=<Your-Password> [-e attach_dbs="[{'dbName':'SampleDb1','dbFiles':['C:\\temp\\dbtest1.mdf','C:\\temp\\dbtest1_log.ldf']}]"] --name sqlserver2019-winserver paulbuer/sqlserver:2019-winserver

Tag summary

Content type

Image

Digest

sha256:6b3de80bc

Size

4.6 GB

Last updated

over 3 years ago

docker pull paulbuer/sqlserver:2019-withdotnet4.8-winserver