Access multiple ports in Docker-compose, Azure web app for container.

2021-06-22T17:28:13.557+00:00

We have docker-compose file with images for UI, DB and NLP Engine.

Default port 8080 is used for incoming requests to the app.
We need to access DB and NLP containers serving in 27017 and 5005 respectively.

Does the Azure web app for Container - docker-compose support this?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,929 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 22,436 Reputation points Microsoft Employee
    2021-06-23T12:36:35.397+00:00

    @Logeeswaran, Saranya (Cognizant) ,

    Azure App Service only exposes ports 80 and 443. Yes, incoming requests from client would just be over 443/80 which should be mapped to the exposed port of the container.
    App Service will attempt to detect which port to bind to your container, but you can also use the WEBSITES_PORT app setting and configure it with a value for the port you want to bind to your container.

    Web App for Containers currently allows you to expose only one port to the outside world. That means that your container can only listen for HTTP requests on a single port.

    From Docker compose configuration stand-point : Ports other than 80 and 8080 are ignored.
    Kindly see the following lists show supported and unsupported Docker Compose configuration options:

    Document section : Docker Compose options