Why would docker container running on local host work but in azure web app we get error?

Huhn, Alexander 95 Reputation points

I have an azure web app running a docker container. I set up and test the docker container, and it works perfectly. when I copy everything to Azure web app and set up the pipelines, when I interact with the app, I receive errors I did not encounter when running locally.

The errors I receive are with respect to some of the functions called from the app.

My question is why it works when running locally, but not when running it in the webapp. I was under the impression that a docker container was completely encapsulated, and would not interact with anything on the local machine, yet when running on the web app, a command or something interacts and raises an error.

I cannot interact with the SHH into the container to explore further, and the log stream does not give relevant information.

I cannot save a diagnostic setting to examine further, as it is blanked out

User's image

Any suggestions how to sort this out? TIA

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

1 answer

Sort by: Most helpful
  1. Filipp Trigub 0 Reputation points

    I have a similar issue:

    My app consists of 2 containers (Python backnd and nginx with flutter UI) in the same network build and deployed to a web app using docker-compose.

    Locally, these communicate with each other without any issues.

    In the Web App the backend cannot be reached. The error indidcates a need to use https, but as I am simply trying to reach a container service at http://<container_name>:8081 I struggle to understand, why https is requested.

    Beyond that I have attempted to deploy the same app to a VM. Similarly, the UI cannot reach the backend throwing a different error: XMLHttpError: ERR_NAME_NOT_RESOLVED.

    My assumption is that the netoworking inside the web app and the VM is somehow different to my local environment prohibting these connections.

    I do not expect it to be identical. At the same time, my app is very rudementary at this point and it seems reasonable to expect that the default settings would work.

    I am grateful for any adivce as I am relatively new to Azure.


    0 comments No comments