Skip to content

Commit dd1a92b

Browse files
authored
Merge pull request #306657 from ShawnKupfer/WB1987
Freshness - Azure API - Management - Center 18
2 parents a83bdef + 6355479 commit dd1a92b

1 file changed

Lines changed: 22 additions & 20 deletions

File tree

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Deploy self-hosted gateway to Docker
2+
title: Deploy Self-Hosted Gateway to Docker
33
description: Learn how to deploy a self-hosted gateway component of Azure API Management to Docker
44
author: dlepow
55
ms.service: azure-api-management
66
ms.topic: how-to
7-
ms.date: 04/19/2021
7+
ms.date: 10/08/2025
88
ms.author: danlep
99
---
1010

@@ -15,40 +15,42 @@ ms.author: danlep
1515
This article provides the steps for deploying self-hosted gateway component of Azure API Management to a Docker environment.
1616

1717
> [!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).
1919
2020
## Prerequisites
2121

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).
2525

2626
> [!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.
2828
2929
## Deploy the self-hosted gateway to Docker
3030

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.
3939

4040
```
4141
docker run -d -p 80:8080 -p 443:8081 --name <gateway-name> --env-file env.conf mcr.microsoft.com/azure-api-management/gateway:<tag>
4242
```
4343

44-
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+
4647
```console
4748
docker ps
4849
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4950
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
5051
```
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.
5254

5355
![gateway status](media/how-to-deploy-self-hosted-gateway-docker/status.png)
5456

@@ -59,5 +61,5 @@ This article provides the steps for deploying self-hosted gateway component of A
5961

6062
## Related content
6163

62-
* To learn more about the self-hosted gateway, see [Azure API Management self-hosted gateway overview](self-hosted-gateway-overview.md).
63-
* [Configure custom domain name for the self-hosted gateway](api-management-howto-configure-custom-domain-gateway.md).
64+
* To learn more about the self-hosted gateway, see [Self-hosted gateway overview](self-hosted-gateway-overview.md).
65+
* [Configure a custom domain name for a self-hosted gateway](api-management-howto-configure-custom-domain-gateway.md).

0 commit comments

Comments
 (0)