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
description: Learn how to deploy a self-hosted gateway component of Azure API Management to Docker
4
4
author: dlepow
5
5
ms.service: azure-api-management
6
6
ms.topic: how-to
7
-
ms.date: 04/19/2021
7
+
ms.date: 10/08/2025
8
8
ms.author: danlep
9
9
---
10
10
@@ -15,40 +15,42 @@ ms.author: danlep
15
15
This article provides the steps for deploying self-hosted gateway component of Azure API Management to a Docker environment.
16
16
17
17
> [!NOTE]
18
-
> Hosting self-hosted gateway in Docker is best suited for evaluation and development use cases. Kubernetes is recommended for production use. Learn how to [deploy with Helm](how-to-deploy-self-hosted-gateway-kubernetes-helm.md) or using [deployment YAML file](how-to-deploy-self-hosted-gateway-kubernetes.md) to learn how to deploy self-hosted gateway to Kubernetes.
18
+
> Hosting a self-hosted gateway in Docker is best suited for evaluation and development use cases. Kubernetes is recommended for production use. Learn how to deploy a self-hosted gateway to Kubernetes with [Helm](how-to-deploy-self-hosted-gateway-kubernetes-helm.md) or by using a [deployment YAML file](how-to-deploy-self-hosted-gateway-kubernetes.md).
19
19
20
20
## Prerequisites
21
21
22
-
- Complete the following quickstart: [Create an Azure API Management instance](get-started-create-service-instance.md)
23
-
- Create a Docker environment.[Docker for Desktop](https://www.docker.com/products/docker-desktop) is a good option for development and evaluation purposes. See [Docker documentation](https://docs.docker.com) for information on all Docker editions, their features, and comprehensive documentation on Docker itself.
24
-
-[Provision a gateway resource in your API Management instance](api-management-howto-provision-self-hosted-gateway.md)
22
+
- Complete the following quickstart: [Create an Azure API Management instance](get-started-create-service-instance.md).
23
+
- Create a Docker environment:[Docker for Desktop](https://www.docker.com/products/docker-desktop) is a good option for development and evaluation purposes. See [Docker documentation](https://docs.docker.com) for information on all Docker editions, their features, and comprehensive documentation on Docker itself.
24
+
-[Provision a gateway resource in your Azure API Management instance](api-management-howto-provision-self-hosted-gateway.md).
25
25
26
26
> [!NOTE]
27
-
> Self-hosted gateway is packaged as a x86-64 Linux-based Docker container.
27
+
> Self-hosted gateways are packaged as x86-64 Linux-based Docker containers.
28
28
29
29
## Deploy the self-hosted gateway to Docker
30
30
31
-
1. Select **Gateways**from under **Deployment and infrastructure**.
32
-
2. Select the gateway resource you intend to deploy.
33
-
3. Select **Deployment**.
34
-
4. Note that an access token in the **Token** text box was autogenerated for you using the default **Expiry** and **Secret key** values. If needed, pick desired values in either or both controls to generate a new token.
35
-
5. Make sure **Docker** is selected under **Deployment scripts**.
36
-
6. Select **env.conf** file link next to the **Environment** to download the file.
37
-
7. Select **copy** icon located at the right end of the **Run** text box to copy the Docker command to clipboard.
38
-
8. Paste the command to the terminal (or command) window. Adjust the port mappings and container name as needed. Note that the command assumes that downloaded environment file is present in the current directory.
31
+
1. Select **Self-hosted gateways** under **Deployment + infrastructure**.
32
+
1. Select the gateway resource you want to deploy.
33
+
1. Select**Settings** >**Deployment**.
34
+
1. Note that an access token in the **Token** text box is autogenerated for you by using the default **Expiry** and **Secret key** values. If needed, pick desired values in either or both controls to generate a new token.
35
+
1. Make sure **Docker** is selected under **Deployment scripts**.
36
+
1. Select the**env.conf** file link next to the **Environment** to download the file.
37
+
1. Select the **Copy** icon located at the right end of the **Run** text box to copy the Docker command to your clipboard.
38
+
1. Paste the command to the terminal (or command) window. Adjust the port mappings and container name as needed. The command assumes that the downloaded environment file is present in the current directory.
9. Execute the command. The command instructs your Docker environment to run the container using a [container image](https://aka.ms/apim/shgw/registry-portal) from the Microsoft Artifact Registry, and to map the container's HTTP (8080) and HTTPS (8081) ports to ports 80 and 443 on the host.
45
-
10. Run the below command to check if the gateway container is running:
44
+
1. Execute the command. The command instructs your Docker environment to run the container by using a [container image](https://aka.ms/apim/shgw/registry-portal) from the Microsoft Artifact Registry, and to map the container's HTTP (8080) and HTTPS (8081) ports to ports 80 and 443 on the host.
45
+
1. Run the following command to check if the gateway container is running:
46
+
46
47
```console
47
48
docker ps
48
49
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
49
50
895ef0ecf13b mcr.microsoft.com/azure-api-management/gateway:latest "/bin/sh -c 'dotnet …" 5 seconds ago Up 3 seconds 0.0.0.0:80->8080/tcp, 0.0.0.0:443->8081/tcp my-gateway
50
51
```
51
-
10. Go back to Azure portal, click on **Overview** and confirm that self-hosted gateway container you just deployed is reporting a healthy status.
52
+
53
+
1. Go back to Azure portal, select **Overview**, and confirm that the self-hosted gateway container you just deployed reports a healthy status.
0 commit comments