How can i open a port in Azure, so that a constant stream of data can be delivered to the server?

Per-Åsmund Grindholm 0 Reputation points
2023-03-15T20:34:43.48+00:00

I need to send something called Artnet to a server that i am hosting. This is a constant stream of data, that will not be stored, but read by the server, to change the color of the page. I am able to do this with a local server, and when i am docking it, but not when it is uploaded to azure.

I am sending the data to a port, which i have managed to open, but it is still not working.

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
645 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Prrudram-MSFT 22,396 Reputation points
    2023-03-17T06:25:40.3333333+00:00

    Hi @Per-Åsmund Grindholm

    Thank you for reaching out to the Microsoft Q&A platform.

    To open a port in a container instance, you can use the EXPOSE directive in your Dockerfile. The EXPOSE directive specifies the ports that the container listens on.

    Here is an example of how to open port 80 in a Dockerfile:

    EXPOSE 80
    

    You can then run the container with the desired port mapping using the -p option with the docker run command. For example, to map port 80 on the host to port 80 in the container, you would run the following command:

    docker run -p 80:80 <image_name>
    

    You can also configure the port mapping in the Azure Container Instance deployment. For more information, see the article "Quickstart - Deploy Docker container to container instance - Docker CLI

    https://learn.microsoft.com/en-us/azure/container-instances/quickstart-docker-cli#main

    Following docker run command is an example to create the Azure container instance with port 80 exposed to the internet:

    docker run -p 80:80 mcr.microsoft.com/azuredocs/aci-helloworld

    Let me know if you have any further queries.

    Please accept as answer and upvote if the above information is helpful for the benefit of the community.