So, I’ve been living under a rock for the last few years and haven’t had the chance to use Docker in development. I’m working my way to get up to speed and have grasped the basics, such as Dockerfile, CLI, etc.
What is unclear to me is how to use Docker while I’m actually writing code. Do I run it inside the container and attach a debugger? Or do I develop in the traditional way (setting up my dev machine like it’s 2010) and only push the container to a registry once I’m happy with the changes?
How do you guys use it? Is there a typical way at all?
I use a volume mount to mount my source code then start up the container. For debugger breakpoints, I attach to the container and treat it like any other process.
You can start up containers with docker manually, but I use docker compose so I can have multiple containers and a checked in yaml configuration for how they should run and depend on each other.