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
In questa pagina del sito puoi guardare il video online How to debug Docker containers! (Python + VSCode) della durata di ore minuti seconda in buona qualità , che l'utente ha caricato DevOps Directive 01 January 1970, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 61,687 volte e gli è piaciuto 1 mille spettatori. Buona visione!