4 ms·
What exactly is diffucult to understand about the value proposition? Seems pretty obvious to me... If you mean why use dev environments in containers: 1) repr
by coldtea 6y ago
What exactly is diffucult to understand about the value proposition? Seems pretty obvious to me...
If you mean why use dev environments in containers:
1) reproducibility,
2) re-use of container creation scripts for different environments,
3) isolation from your actual OS,
4) ability to run the same OS/libs/etc as the final deployment,
5) tons of base images with different environments already configured - from LAMP to data science,
6) easy sharing with others, team
7) ability to work with 1-2-5 or 100 different environments, with different OSes, versions, libs, python versions, whatever.
As for why have your IDE/editor work from inside a container (as described in the article).
Well, because you get all the benefits of containers (as above) PLUS get to use the editor as if you were programming directly on the target machine (including having visibility of installed libraries for autocomplete, running code directly there, and so on).
It's the same thing people have been doing with running Emacs in "server" mode inside another host, and programming with Emacs client on their machines as if they were locally at the machine.
- gshulegaard 6y agoAll of those benefits were solved problems with VM based workflows using something like Vagrant long before Containers started gaining traction (IMO). Don't get me wrong, I am a fan of containers (in particular LXC), but I wouldn't list those benefits as if they are unique or novel to container based workflows. Edit: To be clear, there _are_ benefits to containers over VMs, just not the things you listed above from my perspective.
- closeparen 6y agoSchlepping around and running a whole VBox/Vagrant VM is heavy enough that I will be motivated to see if I can’t get it working under MacOS. Running a container is less offensive.
- z3t4 6y agoIs not docker server running inside a VM though ? You could also run Xserver (available on both Mac and Windows) and ssh -X into a VM to run GUI apps inside the VM.
- coldtea 6y ago>Is not docker server running inside a VM though No, docker server runs directly on top of the OS as a native program. As for Docker containers managed by the Docker server, they are runing on top of a supervisor - not in a full VM.
- altano 6y agoOn Windows Docker runs in a VM.
- coldtea 6y agoThat's wrong: "With the latest version of Windows 10 (or 10 Server) and the beta of Docker for Windows, there's native Linux Container support on Windows. That means there's no Virtual Machine or Hyper-V involved (unless you want), so Linux Containers run on Windows itself using Windows 10's built in container support". In any case, as Linux and macOS prove, there's no need for docker to have to run on a VM. And it seems there's no need on Windows either since 10.
- altano 6y agoYou’re quoting a random blog post from Scott Hanselman and not Docker release notes. I don’t know what happened with that but I was not wrong and Docker for Windows does still run in a VM: https://docs.docker.com/docker-for-windows/install/ https://docs.docker.com/docker-for-windows/install/ I assume you don’t use Docker on Windows and just pasted the first google result?
- jayd16 6y agoVagrant could have made it but it didn't. Seems like the cloud providers leaned into docker much more heavily.
- mbreese 6y agoOverhead... it's all overhead. Starting and connecting to a VM isn't nearly as streamlined as connecting to a Docker container (even if it is also running in a VM). Even the hurdle of SSH'ing to a VM is more cumbersome than `docker run`. Certainly this could be automated and scripted, but the Docker solution is so... streamlined. And I say this as someone that used to use Vagrant. With smaller installs available (such as Alpine), maybe more modern VMs would be just as easy as containers... Also -- for me, VirtualBox was just "meh". It worked, but really wasn't that great. It always seemed like it took too many resources to run. That was another issue with Vagrant. (And yes, I did also use Vagrant with VMWare, but again -- that's a lot of overhead).
- Steltek 6y agoI can't name a more dysfunctional hypervisor than VBox. If my choices were a Virtual Box VM or superhacky Docker-as-VM, I'd pick Docker every day. But I'd say VMs and containers solve different problems. In the case of dev environments, VMs are too "persistent" and accumulate personal cruft very quickly. Container tooling can be built to be noninteractive.
- GordonS 6y agoYes, a lot of containers start in less than 1 second. With SSDs it's not as bad as it used to be for VMs, but it's still a lot longer than a container. I also find the workflow of creating Dockerfiles to be much smoother than cobbling together scripts for a VM. Plus Vagrant was a real PITA to get working on Windows (at least it used to be - I think I eventually gave up trying to get something running on Windows 7).
- coldtea 6y ago>All of those benefits were solved problems with VM based workflows using something like Vagrant long before Containers started gaining traction (IMO). Well, VMs are like overweight containers. Containers make "all of those benefits" easier, more performant, and more ligherweight.
- mbreese 6y ago> 3) isolation from your actual OS For me, this is the major benefit. I don't have to worry about installing new tools or libraries and how they interact with my primary OS. While this isn't a huge issue for many, I don't want to have to worry about how Go, Python, Java, etc... are installed on my Mac. I like being able to pull in a Docker container with everything already setup (or a customized one). Then when I throw away a project, I don't have orphaned installations on my Mac.