I recently encountered an issue where a python unit test was passing inside of a container, but failing locally.
In this video I show a few different tips/techniques for debugging code running within a docker container:
1) Modify the container entrypoint and exec into the container
2) Copy files to and from the container for inspection/comparison
3) Set up a remote debugger inside the container and attach to it from the host
I hope you find these helpful as you debug your own containerized applications.
Cheers!
---
Join the Community:
💬 Discord: / discord
💻 GitHub: https://github.com/sidpalas/devops-di...
🐥 Twitter: / sidpalas
👨💼 LinkedIn: / sid-palas
🌐 Website: https://devopsdirective.com
---
Timestamps:
0:00 - Intro
0:57 - Sample test case overview
1:12 - Sample Dockerfile
2:28 - Tip #1 (modify entrypoint)
4:00 - Tip #2 (docker cp)
5:39 - Tip #3 (remote debugger)
7:16 - Configuring debugger in VSCode
8:54 - Closing thoughts
---
Community Size at Time of Posting:
Subscribers: 225 🎉
Channel Views: 3715
Auf dieser Seite können Sie das Online-Video How to debug Docker containers! (Python + VSCode) mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer DevOps Directive 01 January 1970 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 61,687 Mal angesehen und es wurde von 1 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!