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: articles/app-service/configure-custom-container.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -366,7 +366,7 @@ Group Managed Service Accounts (gMSAs) are currently not supported in Windows co
366
366
Secure Shell (SSH) is commonly used to execute administrative commands remotely from a command-line terminal. In order to enable the Azure Portal SSH console feature with custom containers, the following steps are required:
367
367
368
368
1. Create a standard [sshd_config](https://man.openbsd.org/sshd_config) file with the following example contents and place it on the application project root directory:
369
-
369
+
370
370
```
371
371
Port 2222
372
372
ListenAddress 0.0.0.0
@@ -381,24 +381,24 @@ Secure Shell (SSH) is commonly used to execute administrative commands remotely
381
381
PermitRootLogin yes
382
382
Subsystem sftp internal-sftp
383
383
```
384
-
384
+
385
385
> [!NOTE]
386
386
> This file configures OpenSSH and must include the following items in order to comply with the Azure Portal SSH feature:
387
387
> - `Port` must be set to 2222.
388
388
> - `Ciphers` must include at least one item in this list: `aes128-cbc,3des-cbc,aes256-cbc`.
389
389
> - `MACs` must include at least one item in this list: `hmac-sha1,hmac-sha1-96`.
390
-
390
+
391
391
2. Create an entrypoint script with the name `entrypoint.sh` (or change any existing entrypoint file) and add the command to start the SSH service, along with the application startup command. The below example demonstrates starting a Python application, please replace the last command according to the project language/stack:
392
-
392
+
393
393
### [Debian](#tab/debian)
394
-
394
+
395
395
```Bash
396
396
#!/bin/sh
397
397
set -e
398
398
service ssh start
399
399
exec gunicorn -w 4 -b 0.0.0.0:8000 app:app
400
400
```
401
-
401
+
402
402
### [Alpine](#tab/alpine)
403
403
404
404
```Bash
@@ -408,46 +408,46 @@ Secure Shell (SSH) is commonly used to execute administrative commands remotely
408
408
exec gunicorn -w 4 -b 0.0.0.0:8000 app:app
409
409
```
410
410
---
411
-
411
+
412
412
3. Add to the Dockerfile the following instructions according to the base image distribution. The same will copy the new files, install OpenSSH server, set proper permissions and configure the custom entrypoint, and expose the ports required by the application and SSH server, respectively:
> The root password must be exactly `Docker!` as it is used by App Service to let you access the SSH session with the container. This configuration doesn't allow external connections to the container. Port 2222 of the container is accessible only within the bridge network of a private virtual network and is not accessible to an attacker on the internet.
0 commit comments