Docker Containers vs. Traditional VMs for Development

ScrumMeeting

New member
I'm diving into some personal projects and considering whether to use Docker containers instead of traditional VMs. Those who have used both, what are your thoughts on ease of use, performance, and resource efficiency? Any tips for a beginner looking into containerization?
 
When comparing Docker containers to traditional VMs, ease of use is often cited as a major benefit with containers being lighter and faster. In terms of performance, containers are also typically faster and use fewer resources compared to VMs. As a beginner, start with understanding the basic concepts of Docker, explore different use cases, and experiment with containerizing simple applications to gain hands-on experience.
 
Why are you developing in a VM? I guess that would be a deciding factor in how to decide.

I've gone back and forth with containers in development, settling on this: Application code running on the host. Dependencies (Postgres, Redis, etc) running in containers. Every project has a docker-compose.yml file and each service binds to the external port (5432, or whatever).

If you use something like Orbstack, you can make this even nicer by using hostnames for services and not exposing the port on the host.

I find I want my application code easily accessible for debugging tools, where the container may get in the way. I don't normally have to debug my service dependencies but I want their versions and configuration to be reproducible.
 

Forum statistics

Threads
81,042
Messages
248,664
Members
20,690
Latest member
JohnMuller
Top