News for hackers. Stuff that matters.
Re:VSCode, Dev Containers and Docker by IggleSniggle on Thursday January 21, 2021 @11:09AM (#25860370)
What would be the advantage of this setup over a traditional VM where you presumably have more portability of the stateful image?
Re:VSCode, Dev Containers and Docker by treis on Thursday January 21, 2021 @11:36AM (#25860744)
Since they're lighter weight it's easier to run more of them. Think of a place with 7-8 different applications, a few different DBs to support them, redis, elastic search, etc. You can spin up a mirror of your production environment with one command. Theoretically you can do the same with VMs but it will consume a lot more resources.
Re:VSCode, Dev Containers and Docker by nly on Thursday January 21, 2021 @12:09PM (#25861231)
This is only true of Docker on Linux hosts.
Re:VSCode, Dev Containers and Docker by treis on Thursday January 21, 2021 @12:52PM (#25861765)
Even on Windows/Mac you're probably better off running 1 VM and then docker inside of it.
Re:VSCode, Dev Containers and Docker by scoopertrooper on Thursday January 21, 2021 @10:42PM (#25868055)
Isn't that essentially what mac Docker Desktop does?
Re:VSCode, Dev Containers and Docker by IggleSniggle on Friday January 22, 2021 @10:05AM (#25872207)
Correct.
Re:VSCode, Dev Containers and Docker by ItalyPaleAle on Thursday January 21, 2021 @11:13AM (#25860421)
Speaking for myself, containers are started and destroyed faster. When using VMs, the tendency is to keep updating the software within the VM, making changes to their state, etc: this eventually leads to drifts. When using containers, if you need to make a change, you destroy the container and re-build it, and the state is always consistent with what you (and possibly your teammates) use
Re:VSCode, Dev Containers and Docker by Shicholas on Thursday January 21, 2021 @08:43PM (#25867183)
as an addition to do this, we've found it easier to spin up the same exact environment for CI/CD.
Re:VSCode, Dev Containers and Docker by adamkl on Thursday January 21, 2021 @11:31AM (#25860682)
To be perfectly honest, in this scenario, there isn't much of an advantage.

The container approach is lighter weight, and I found it easier to manage the configuration via Dockerfiles. Managing a full VM with the OS install is a bit of a pain.

That being said, I worked at an organization that did the VM approach using Vagrant. It wasn't as nice as the VS Code/Docker approach, but the results were similar.