Nice video. I've been exploring docker containers and the extra abstraction makes debugging more awkward. This was super helpful!
@DevOpsDirective4 жыл бұрын
Thanks Mike! Relevant to your area of expertise, containers can be a game-changer for eliminating dependency issues for data science work: - Have a legacy model that is still living in the past and requires Python 2.7? No problem! - Need different versions of TensorFlow various applications you are developing? Sure! - Calling out to some 3rd party tool that only runs in Linux? Great!
@meigu014 жыл бұрын
@@DevOpsDirective Hi i got Error: -m: missing , is this correct? ENTRYPOINT ["python","-m","debugpy", "listen", "0.0.0.:5678", "--wait-for-client","-m"]
@TuomoKankaanpaa4 жыл бұрын
Wow the remote debugger and attaching it to vs code will really come in handy! And congrats on the 200 subs 🙌🎉
@DevOpsDirective4 жыл бұрын
Thanks! -- Yes, it takes a bit of work to have the separate Dockerfile stage, but for debugging complex issues it is really the way to go!
@akozy3 жыл бұрын
This is what I was looking for!!! It seemed so hard to find for some reason. Can't wait to see your channel grow. Keep it up!
@DevOpsDirective3 жыл бұрын
Well, I'm glad you found your way to my little corner of KZbin! 😁 Welcome to the team! 👋
@thebluechimera4 жыл бұрын
Great video! I've always found Docker quite intimidating, this was good to watch
@DevOpsDirective4 жыл бұрын
Thanks @Maria! It is a bit of a steep learning curve, but once you get used to it, the added confidence that something in production will behave the same way as on your laptop is amazing!
@thebluechimera4 жыл бұрын
@@DevOpsDirective I know right! Quite an awesome feeling
@AZIARGROUS3 жыл бұрын
Thank you man! This is exactly the kind of concept I was playing with these days. Thank you for explaining how to expose that port from docker to local host.
@DevOpsDirective2 жыл бұрын
You are welcome, Paolo!
@kab99963 жыл бұрын
Thanks for the best and the clearest tutorial on how to debug python into Docker with VSC !
@DevOpsDirective3 жыл бұрын
Woot! Thanks @Ka -- your comment makes me smile :)
@timaudsley60804 ай бұрын
Thanks, this is exactly what I required!
@machinelearningid39314 жыл бұрын
From traversy, thanks, your devops video are awesome.
@DevOpsDirective4 жыл бұрын
Welcome aboard @Machine Learning ID! 👋👋👋 Happy to have you here!
@ערןאוצפ2 жыл бұрын
Great video, thanks !
@DevOpsDirective2 жыл бұрын
You're welcome! 🎉
@SgtMajorJay4 жыл бұрын
Your videos are fire
@DevOpsDirective4 жыл бұрын
Thanks @SomeDude! 🔥🔥🔥
@BuckheadmaniacАй бұрын
which directory of the github repo should I look for this video?
@abrahammathewos99173 жыл бұрын
Thank you! you are the best.
@DevOpsDirective3 жыл бұрын
Thank you @Abraham! Comments like this make me want to keep putting out even better videos!
@plashless34063 жыл бұрын
This is really amazing. I'm having a use case would really appreciate for helping me out. :) I'm running services in Docker Containers i-e web, db, worker(celery). Is there any way so that I can add a breakpoint in the Pycharm(code) and it will start the debugger in the containers(specifically celery worker)?
@ShikhaSingh0410 ай бұрын
Can you suggest any other dependency for debugging else than debugpy?
@SaifPasha-s7t10 ай бұрын
I have my dockerfile made and Im using fastapi python but when I run my application via that play button of VSCODE I run into a error called PYTHON PATH IN YOUR DEBUG CONFIGURATION IS INVALID. please help me with that ..
@danh_phuong92973 жыл бұрын
That's great. I'm looking for debugging C in docker with VSCode. Please suggest any solution !!!
@DevOpsDirective3 жыл бұрын
One options would be to have a multi-stage image with an extra Debugger stage in which you install any of your favorite debugging tools. This way you can keep your production image small but have an image to recreate any bugs in that has the necessary tools for debugging
@edustreamimg4 жыл бұрын
good job buddy!
@DevOpsDirective4 жыл бұрын
Thanks @Eduardo!
@edustreamimg4 жыл бұрын
@@DevOpsDirective In 6:35 you are creating 3 images?
@DevOpsDirective4 жыл бұрын
@@edustreamimg Yeah, here is more info on multi-stage builds docs.docker.com/develop/develop-images/multistage-build/ By using the --target option when building the Dockerfile I can tell Docker which of the stages I want it to build (docs.docker.com/develop/develop-images/multistage-build/#stop-at-a-specific-build-stage)
@edustreamimg4 жыл бұрын
@@DevOpsDirective Is a good practice not to run debugger in same container? why?
@DevOpsDirective4 жыл бұрын
@@edustreamimg There are a number of reasons you wouldn't want to have a debugger running inside your production container. The three that come to mind are: 1) Simplicity -- Each container should have a singular focus. By adding a debugger, you lose that. 2) Security -- It's best not to have additional surface area for potential attackers to try and exploit (you would need to open an additional port to access, etc...) 3) Performance -- having the debugger running is one more thing to take compute cycles away from your application KZbin comments are a bit clunky for technical discussions. I have a discord server if you want to continue the discussion with lots of other smart folks! discord.gg/CQYSqKvqqa
@kid_kulafu_17274 жыл бұрын
Who’s here because you saw this dude on brads channel? Thank you for this sir.
@DevOpsDirective4 жыл бұрын
Hi @aRtoo _ -- Welcome! 😄
@mariacristinaarezzi Жыл бұрын
I'm happy to meet you
@uncoding_with_raj Жыл бұрын
Can we connect VSCODE debugger AUTOMATICALLY to docker container without hitting the play button in VSCODE ?
@yuriwolf623411 ай бұрын
Dear Sid, do I have to rebuild the docker image every time I modify something in my .py file? thanks regards
@yuriwolf623411 ай бұрын
just answering myself: I got to mount the :/app directory on the container to a path on my local machine where i copy my files docker run -v /path/on/local/machine :/app -p 5678:5678 image_id main_python_file
@acavaelnick3 жыл бұрын
Great, thanks
@DevOpsDirective3 жыл бұрын
You are welcome, @Joaquin!
@nareshmp12 жыл бұрын
Nice video. Is it possible to debug the code step by step? Especially when its web2py app?
@DevOpsDirective2 жыл бұрын
Once you have attached the debugging session as shown in the video you should be able to step through to any breakpoints you set!
@jansoriano74514 жыл бұрын
Hi Sid, I've seen your video tutorial on Brads channel. I'm currently a shopify dev, and I want to become a devops engineer. I am hoping to get tips from you or your channel. Thanks!
@DevOpsDirective4 жыл бұрын
Hi @Jan - Happy to have you here! Welcome to the team! 👋👋👋
@jansoriano74514 жыл бұрын
@@DevOpsDirective Thanks Sid!
@jarorkwong80423 жыл бұрын
Volumn up
@DevOpsDirective3 жыл бұрын
Thanks, this was before I had figured out the whole audio recording/editing thing... 😅 Hopefully my newer videos have better, more consistent audio!