I have a myserious bug that I'm trying to fix, but I have to rebuild the docker image and reupload the new version any time I make a small change and want to see if it changes anything. Is there a way to do the changes directly in the container app instead and then upload a final version when I find what the problem is instead of reuploading after every change?
The bug itself is that GET-requests out of the container work fine, but not POST-requests. I've allowed all traffic in Ingress, made sure that no ports collide, no firewall, set protocol to automatic detection etc., but nothing changes the output. Except for when I try to add debugging lines in the code and stack traces for debugging, then the container won't run at all.
As I mentioned in comment.
Your question- Is there a way to do the changes directly in the container app instead and then upload a final version when I find what the problem is instead of reuploading after every change?
Answer- Yes, there is a way to debug issues within your container without having to rebuild and reupload the image every time.
What? Use Docker Volumes for Code Hot-Swapping
How? Follow this doc- How to apply changes to my code automatically in my container without restarting it
And for the The bug itself is that GET-requests out of the container work fine, but not POST-requests. part, most likely your application code within the container is not properly configured to handle POST requests. Since there is no details shared from your end I can suggest generic steps for troubleshooting. you've already checked network-related issues, such as ingress and firewall settings.
Check the logs to see if there are any errors related to POST requests in the application logs.
also, after connecting to the container, try making POST requests internally from within the container using curl
to check if the service works inside the container.
you can temporarily switch your container image to a debug version for further troubleshooting.
Also read these once-
https://www.docker.com/blog/how-to-fix-and-debug-docker-containers-like-a-superhero/
https://learn.microsoft.com/en-us/azure/container-apps/troubleshooting?tabs=bash