Container image does not expose any ports

Dengke Qi 20 Reputation points Microsoft External Staff
2025-05-19T06:42:52.45+00:00

I created an app service and the publish mode is "Container". This service will pull a docker image and run a container to start an angular service. I configured a parameter named WEBSITES_PORT to specify the exposed port of the Docker container. However, by checking the deployment log of the App Service, it prompted:
Container image does not expose any ports. Defaulting to port 80

Setting value of PORT variable to 80

Creating container with image: ** from registry: *** and fully qualified image name **
Container start up failed with reason: ContainerCreateFailure. Revert by terminate.
*
I haven't modified any configuration recently.
Thank you very much for the help you provided!*

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,986 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Laxman Reddy Revuri 5,400 Reputation points Microsoft External Staff Moderator
    2025-05-19T10:22:04.7466667+00:00

    Hi @Dengke Qi
    It looks like you're running into a problem with your Azure App Service not recognizing the port you've configured for your Docker container. The message you’re seeing indicates that the container image you are using does not expose any ports, hence it defaults to port 80.

    1.Ensure that your Dockerfile includes the EXPOSE instruction for the port your application is listening on. For example, if your Angular service listens on port 8000, your Dockerfile should have a line like this:

    EXPOSE 8000

    2.You mentioned that you configured the WEBSITES_PORT parameter. Double-check to make sure it's set correctly in your App Service settings. You can do this through the Azure portal or the Azure CLI:

    az webapp config appsettings set --resource-group <your-resource-group> --name <your-app-name> --settings WEBSITES_PORT=8000
    

    https://learn.microsoft.com/en-us/azure/container-apps/troubleshoot-target-port-settings#causes

    Please accept as "Yes" if the answer provided is useful , so that you can help others in the community looking for remediation for similar issues.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.