You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/linux/quickstart-install-connect-docker.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,7 @@ Before starting the following steps, make sure that you've selected your preferr
102
102
::: zone pivot="cs1-bash"
103
103
```bash
104
104
sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong@Passw0rd>" \
105
-
-p 1433:1433 --name sql1 -hostname sql1 \
105
+
-p 1433:1433 --name sql1 --hostname sql1 \
106
106
-d \
107
107
mcr.microsoft.com/mssql/server:2017-latest
108
108
```
@@ -115,7 +115,7 @@ Before starting the following steps, make sure that you've selected your preferr
115
115
116
116
```PowerShell
117
117
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong@Passw0rd>" `
118
-
-p 1433:1433 --name sql1 -hostname sql1 `
118
+
-p 1433:1433 --name sql1 --hostname sql1 `
119
119
-d `
120
120
mcr.microsoft.com/mssql/server:2017-latest
121
121
```
@@ -124,7 +124,7 @@ Before starting the following steps, make sure that you've selected your preferr
124
124
::: zone pivot="cs1-cmd"
125
125
```cmd
126
126
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong@Passw0rd>" `
127
-
-p 1433:1433 --name sql1 -hostname sql1 `
127
+
-p 1433:1433 --name sql1 --hostname sql1 `
128
128
-d `
129
129
mcr.microsoft.com/mssql/server:2017-latest
130
130
```
@@ -143,7 +143,7 @@ Before starting the following steps, make sure that you've selected your preferr
143
143
|**-e "SA_PASSWORD=\<YourStrong@Passw0rd\>"**| Specify your own strong password that is at least eight characters and meets the [SQL Server password requirements](../relational-databases/security/password-policy.md). Required setting for the SQL Server image. |
144
144
|**-p 1433:1433**| Map a TCP port on the host environment (first value) with a TCP port in the container (second value). In this example, SQL Server is listening on TCP 1433 in the container and this is exposed to the port, 1433, on the host. |
145
145
|**--name sql1**| Specify a custom name for the container rather than a randomly generated one. If you run more than one container, you cannot reuse this same name. |
146
-
|**-hostname sql1**| Used to explicitly set the container hostname. If you don't specify the hostname, it defaults to the container ID, which is a randomly generated system GUID. |
146
+
|**--hostname sql1**| Used to explicitly set the container hostname. If you don't specify the hostname, it defaults to the container ID, which is a randomly generated system GUID. |
147
147
|**-d**| Run the container in the background (daemon) |
148
148
|**mcr.microsoft.com/mssql/server:2017-latest**| The SQL Server 2017 Linux container image. |
149
149
@@ -178,7 +178,7 @@ Before starting the following steps, make sure that you've selected your preferr
The `-hostname` parameter as discussed above, changes the internal name of the container to a custom value. This is the name you'll see returned in the following Transact-SQL query:
181
+
The `--hostname` parameter as discussed above, changes the internal name of the container to a custom value. This is the name you'll see returned in the following Transact-SQL query:
182
182
183
183
```sql
184
184
SELECT @@SERVERNAME,
@@ -187,7 +187,7 @@ SELECT @@SERVERNAME,
187
187
SERVERPROPERTY('ServerName')
188
188
```
189
189
190
-
Setting `-hostname` and `--name` to the same value is a good way to easily identify the target container.
190
+
Setting `--hostname` and `--name` to the same value is a good way to easily identify the target container.
191
191
192
192
5. As a final step, change your SA password because the `SA_PASSWORD` is visible in `ps -eax` output and stored in the environment variable of the same name. See steps below.
193
193
@@ -239,23 +239,23 @@ Before starting the following steps, make sure that you've selected your preferr
239
239
::: zone pivot="cs1-bash"
240
240
```bash
241
241
sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong@Passw0rd>" \
242
-
-p 1433:1433 --name sql1 -hostname sql1 \
242
+
-p 1433:1433 --name sql1 --hostname sql1 \
243
243
-d mcr.microsoft.com/mssql/server:2019-latest
244
244
```
245
245
::: zone-end
246
246
247
247
::: zone pivot="cs1-powershell"
248
248
```PowerShell
249
249
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong@Passw0rd>" `
250
-
-p 1433:1433 --name sql1 -hostname sql1 `
250
+
-p 1433:1433 --name sql1 --hostname sql1 `
251
251
-d mcr.microsoft.com/mssql/server:2019-latest
252
252
```
253
253
::: zone-end
254
254
255
255
::: zone pivot="cs1-cmd"
256
256
```cmd
257
257
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong@Passw0rd>" `
258
-
-p 1433:1433 --name sql1 -hostname sql1 `
258
+
-p 1433:1433 --name sql1 --hostname sql1 `
259
259
-d mcr.microsoft.com/mssql/server:2019-latest
260
260
```
261
261
::: zone-end
@@ -273,7 +273,7 @@ Before starting the following steps, make sure that you've selected your preferr
273
273
|**-e "SA_PASSWORD=\<YourStrong@Passw0rd\>"**| Specify your own strong password that is at least eight characters and meets the [SQL Server password requirements](../relational-databases/security/password-policy.md). Required setting for the SQL Server image. |
274
274
|**-p 1433:1433**| Map a TCP port on the host environment (first value) with a TCP port in the container (second value). In this example, SQL Server is listening on TCP 1433 in the container and this is exposed to the port, 1433, on the host. |
275
275
|**--name sql1**| Specify a custom name for the container rather than a randomly generated one. If you run more than one container, you cannot reuse this same name. |
276
-
|**-hostname sql1**| Used to explicitly set the container hostname. If you don't specify the hostname, it defaults to the container ID, which is a randomly generated system GUID. |
276
+
|**--hostname sql1**| Used to explicitly set the container hostname. If you don't specify the hostname, it defaults to the container ID, which is a randomly generated system GUID. |
277
277
|**mcr.microsoft.com/mssql/server:2019-latest**| The SQL Server 2019 Ubuntu Linux container image. |
278
278
279
279
3. To view your Docker containers, use the `docker ps` command.
@@ -302,7 +302,7 @@ Before starting the following steps, make sure that you've selected your preferr
302
302
303
303
4. If the **STATUS** column shows a status of **Up**, then SQL Server is running in the container and listening on the port specified in the **PORTS** column. If the **STATUS** column for your SQL Server container shows **Exited**, see [Troubleshooting SQL Server Docker containers](sql-server-linux-docker-container-troubleshooting.md).
304
304
305
-
The `-hostname` parameter as discussed above, changes the internal name of the container to a custom value. This changes the internal name of the container to a custom value. This is the name you'll see returned in the following Transact-SQL query:
305
+
The `--hostname` parameter as discussed above, changes the internal name of the container to a custom value. This changes the internal name of the container to a custom value. This is the name you'll see returned in the following Transact-SQL query:
0 commit comments