I have a Python script that uses an Azure Service Bus underneath. It is a simulation, so it communicates through the Service Bus using the Pub Sub and Topics and prints information about some events.
I made a Dockerfile that installs all the requirements, sets the ENV variables from Azure and runs the file that starts the simulation.
When I run the Docker Image locally using docker run <image>, it does nothing until it's done running and then it spits all the logs out.
When I run the Docker image locally using docker run -it <image>, I can see all the logs coming one by one.
I pushed the Image to Azure Container Registry and created a Docker Container Instance with that image. When I run the container and use az container logs <rg> <name> or az container attach <rg> <name>, it does not show logs like it does with the docker run -it command, but spits them out when the simulation is all done.
Is it possible to see the logs in realtime?
What I tried is to run the container instance by pressing 'play' in Azure and then to see the logs in the 'logs' tab. But when the container is running, it says: 'no logs avaiable'. Then I tried the Azure Cloud Shell commands I mentioned above, but it still does not show the Logs.
