Skip to content

Commit 301a5aa

Browse files
author
knom
committed
Updated
1 parent f93e4bc commit 301a5aa

File tree

1 file changed

+26
-11
lines changed
  • samples/manage/windows-containers/mssql-server-2014-express-windows

1 file changed

+26
-11
lines changed

samples/manage/windows-containers/mssql-server-2014-express-windows/readme.md

+26-11
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ You can run the container with the following command.
3131
(Note the you'll need Windows Server Core TP5 v10.0.14300.1000.)
3232

3333
````
34-
docker run -p 1433:1433 -v C:/temp/:C:/temp/ --env sa_password=<YOUR SA PASSWORD> --env attach_dbs="<DB-JSON-CONFIG>" -v microsoft/mssql-server-2014-express-windows
34+
docker run -p 1433:1433 -v C:/temp/:C:/temp/ --env sa_password=<YOUR SA PASSWORD> --env attach_dbs="<DB-JSON-CONFIG>" microsoft/mssql-server-2014-express-windows
3535
````
3636

3737
- **-p HostPort:containerPort** is for port-mapping a container network port to a host port.
@@ -44,20 +44,35 @@ docker run -p 1433:1433 -v C:/temp/:C:/temp/ --env sa_password=<YOUR SA PASSWORD
4444
## Run this sample
4545

4646
The image provides two environment variables to optionally set: </br>
47-
- sa_password: Sets the sa password and enables the sa login
48-
- attach_dbs: The configuration for attaching custom DBs (.mdf, .ldf files).
47+
- **sa_password**: Sets the sa password and enables the sa login
48+
- **attach_dbs**: The configuration for attaching custom DBs (.mdf, .ldf files).
4949

50-
This should be a JSON string, formed like the following (note the SINGLE quotes and everything in one line):
50+
This should be a JSON string, in the following format (note the use of SINGLE quotes!)
5151
```
52-
[{'dbName':'MaxDb','dbFiles':['C:\\temp\\maxtest.mdf','C:\\temp\\maxtest_log.
53-
ldf']},{'dbName':'PerryDb','dbFiles':['C:\\temp\\perrytest.mdf','C:\\temp\\perrytest_log.
54-
ldf']}]
52+
[
53+
{
54+
'dbName': 'MaxDb',
55+
'dbFiles': ['C:\\temp\\maxtest.mdf',
56+
'C:\\temp\\maxtest_log.ldf']
57+
},
58+
{
59+
'dbName': 'PerryDb',
60+
'dbFiles': ['C:\\temp\\perrytest.mdf',
61+
'C:\\temp\\perrytest_log.ldf']
62+
}
63+
]
5564
```
56-
There can be zero to many databases in the array.
57-
- dbName: The name of the database
58-
- dbFiles: An array of absolute paths to the .MDF and .LDF files.
5965

60-
Can be one or many, note that the path has double backslashes for escaping!
66+
This is an array of databases, which can have zero to N databases.
67+
68+
Each consisting of:
69+
- **dbName**: The name of the database
70+
- **dbFiles**: An array of one or many absolute paths to the .MDF and .LDF files.
71+
72+
**Note:**
73+
The path has double backslashes for escaping!
74+
The path refers to files **within the container**. So make sure to include them in the image or mount them via **-v**!
75+
6176

6277
This example shows all parameters in action:
6378
```

0 commit comments

Comments
 (0)