I ban Docker from my MacBook.
I got a MacBook Pro M1 recently. It got a really fast processor, and got a solid build aluminum frame, a big and solid touchpad, and a very nice screen.
The major downside of the MacBook is, it is using MacOs and It cannot run Docker natively. This is hard for me who uses Docker on Linux as second nature.
Docker in MacOs needs to run in a VM and it eats RAM like candy, more than Google Chrome could ever have. I found that it took 8GB of RAM hostage for running nothing and my application windows started to freeze after I run all of my development tools. The MacOs starts to use swap memory and it uses it more and more(not good for the NVME drive longevity). I notice it and try to close the unused program but it seems not enough.
The 8GB is half of my machine's memory. It could be used to run something more productive like watching Youtube videos to entertain me while working (just kidding, don't fire me). The 8GB could use to run 3 Jetbrain IDEs or 100 Chrome tabs or run the Stable Diffusion image generator in the background.
Docker needs to go!
I can close the Docker Desktop (which does not kill the Docker VM) and kill the Docker VM using the command:
I go for the hard way, I choose to remove the Docker entirely from my Macbook to force myself to live without it.
Life without Docker
Life without Docker is not that easy. I still need to locally run some components like Redis, Elastic Stack, and Databases. I use some from Homebrew, and sometimes download it from the source and run it manually. I wish I could have a tool to translate Dockerfile or docker-compose.yml to the Homebrew install, and run commands (Maybe I could make a tool to solve this problem). Additionally, the component's performance is noticeably faster than running on Docker.
I have to create GitHub Actions workflow to build a Docker image to ship my software, which is a good practice. No more manually building packages and picking the wrong version to run on production.
When I really need Docker to test building, or test images, I still have Docker on a Linux server hosted on a really cheap cloud, so I’m missing nothing.
Removing Docker and reclaiming 8GB of my RAM is good for my software development life and you should try it too. if you got the same problem.