4 ms·
Why run Docker inside a VM on a Mac, when you can just run the Linux dev environment directly inside the VM? That's just starting to sound like Docker for the
by SkyMarshal 5y ago
Why run Docker inside a VM on a Mac, when you can just run the Linux dev environment directly inside the VM? That's just starting to sound like Docker for the sake of Docker.
Multipass, Qemu, and Parallels can all provide a solid VM on Mac host. All you need after that is your dev environment VM guest image to deploy to the team.
https://wiki.qemu.org/Hosts/Mac https://wiki.qemu.org/Hosts/Mac
https://www.parallels.com/ https://www.parallels.com/
- dsjoerg 5y agoSome people here actually want and need Docker features. For me it's the ability to run from a given image and know that I've got _exactly_ the same image that other developers have. Reproducibility.
- techthumb 5y agoWhen I want a very specific version if the image, I use the SHA to pull/run $ docker pull hello-world@sha256:7d91b69e04a9029b99f3585aaaccae2baa80bcf318f4a5d2165a9898cd2dc0a1
- _joel 5y agoOr you could tag a little more optimally.
- rileymichael 5y agoTags are mutable, digests aren't.
- _joel 5y agoWhy, how often do you change tags after you've built a container and for what reason if so?
- jonjonsonjr 5y agoDigests cryptographically guarantee that you get the correct content, which prevents both malicious tampering (mitm, stolen credentials, etc) or accidental mutations. This is why "immutable tags" are a bad substitute and an oxymoron. There are also better caching properties when using content addressable identifiers. For example with kubernetes pull policies, using IfNotPresent and deploying by digest means you don't even have to check with the registry to initialize a pod if the image is already cached, which can improve startup latency.
- knicknic 5y agoWith a sha you shouldn’t have to change the pull policy. However there isn’t a need for always if you have the sha.
- darkwater 5y ago> There are also better caching properties when using content addressable identifiers. For example with kubernetes pull policies, using IfNotPresent and deploying by digest means you don't even have to check with the registry to initialize a pod if the image is already cached, which can improve startup latency. While agree on the unquoted part, this is true also for human-readable (aka mutable-that-should-be-immutable) tags, when that pull policy is set (which is by default for everything that is not `latest`)
- horsawlarway 5y agoI might be wrong, but I think his point is that by the time you're running a linux VM for docker, why not go ahead and get the rest of the tooling for free? Docker can still be run in the VM just fine, for cases where you want a reproducible build environment. I do this at any company that lets me (and by lets, I mean doesn't explicitly forbid) - They all give me a Mac, and the first (and sometimes only) thing I install is usually vmware fusion, followed by the linux distro of my choice (Arch).
- SkyMarshal 5y ago>for cases where you want a reproducible build environment. Or just create your reproducible build environment as a QEMU VM image instead of a docker file. That way you only have to install a VM image, instead of install VM image/OS + install Docker + install your Docker file.
- dolmen 5y agoJust the cost of porting one single Dockerfile to anything else is bigger than the Docker licence cost for 1 year.
- horsawlarway 5y agoSee, I don't really agree here. Containers solve a different problem than vms. The biggest issues (at least for me) are 1. The second a dev starts using that VM, it's no longer reproducible. The goal of docker is that a developer can create reproducible images as a part of normal development. 2. I won't be running that QEMU vm in production, but I might very well be running the exact same container image in both development and production.
- osdril 5y agoOn Apple Silicon Multipass actually uses QEMU under the hood. Basically it's just a (very convenient) wrapper
- rcarmo 5y agoBecause you can map your working folder inside it on both Multipass and WSL2, and you can get an integrated editor experience with VS Code, which is what many people apparently want to do (I’m a tmux guy so I don’t care, but I thought I’d provide a user-friendly approach).
- sneak 5y agoBecause the end result of a lot of workflows (eg k8s) is a buildable dockerfile, or built docker image for deployment.
- discordance 5y agoI want to ship a dockerfile in my CI/CD pipeline, not a VM image