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.
 
If it is for development, using containers is a much more efficient, fast and convienient way of working. You need less resourses in term of disk and memory, and can save a lot of time deploying now istances.

Consider using Podman, instead of Docker, which is more modern :)
 

Latest posts

Forum statistics

Threads
81,382
Messages
249,180
Members
20,709
Latest member
RackMaster
Top