5 ms·
That's correct. Not building/re-building the containers constantly. However, the initial build takes forever and some containers tend to crash (e.g., Prisma). P
by technotarek 7y ago
That's correct. Not building/re-building the containers constantly. However, the initial build takes forever and some containers tend to crash (e.g., Prisma). Plus, in our case where we're using Angular, the recompiling of the app on change sends the fan into overdrive and I get noticeable lag on application switching. Again, this is on a 2013 MBA, which is almost ridiculous, but I'm that type of person. Still proudly sporting my iPhone SE. My development partner is on the 2019 MBA and has noticed improvement, but albeit rather underwhelming.
As an aside, I haven't taken the time to pin point the exact problem, but as much I prefer to use Firefox, it doesn't seem to do a great job of managing resources for the SPAs we're building.
- ricketycricket 7y agoMake sure your node_modules directory is mapped to a local volume inside docker (not synced to your Mac). This dramatically improves build performance in Docker for Mac. If using docker compose, try this out https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder/38601156#38601156 https://stackoverflow.com/questions/29181032/add-a-volume-to...
- ehutch79 7y agoThis is a dumb question, but you're talking about using docker, right? Doesn't docker spin up an entire vm for containers? That does seem pretty heavy for a MBA of any generation?
- hobofan 7y ago> Doesn't docker spin up an entire vm for containers? (It generally does not. Instead it uses more lightweight isolation primtives. That has always been one of its main selling points.) EDIT: see reply > That does seem pretty heavy for a MBA of any generation? It very much depends on what you are running inside the containers. I regularly have a dev environment with ~8 relatively lightweight containers running on my Early 2014 MBA without any problems.
- mikewhy 7y agoDocker for Mac very much uses a VM. It's as lightweight as it can be (using the OS-supplied hypervisor, not something third party), but still a VM.
- ecnahc515 7y agoThe context is on MacOS. Docker is a Linux technology, it runs Linux containers, thus it requires a Linux VM to run Docker on a Mac.
- qayxc 7y agoIt's not a VM, which is the point of docker in the first place. I agree, though, that it's next to unusable on a low-power dual-core system like the MBA if only for limited RAM.
- mcpeepants 7y agodocker on mac does indeed leverage a VM as the docker host, since a Linux kernel is required
- qayxc 7y agoTo my understanding Docker doesn't do hardware virtualisation and doesn't run indiviual VMs per container instance, though, or does it?
- mcpeepants 7y agoit does not, but there is still some overhead running a single linux VM for the docker host on macOS
- menssen 7y agoIt's almost impressive that Docker-on-macOS works so seamlessly that people are downvoting this comment. Yes, Docker containers run in a Linux VM on macOS. It's just one though, and generally seems fine on low resource workstations, unlike Vagrant setups from a few years ago that tried to run a VM for every application.
- estebarb 7y agoJS build times? I guess that I haven't touched JS development in a while... My Early 2011 MBP (with SSD and RAM upgrade to 16GB) still rocks with intensive information retrieval and other big data tasks (Go, Java, Python).