I ban Docker from my MacBook.

Artiya
3 min readSep 26, 2022

--

Why?

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.

Memory allocate set to 8GB, which can be set lower but some images will run noticeably slower or run out of memory.

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:

killall com.docker.osx.hyperkit.linux

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.

My Cheap Cloud => https://medium.com/@artiya4u/what-is-the-cheapest-cloud-server-for-my-personal-use-de9f3626e56b

Conclusion

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.

Update:
This is based on out-of-date information, now more Docker images support Arm64 Apple silicon architecture. The image now can run on my Macbook M1 fast as ever no need to worry about memory consumption for Docker anymore.

--

--

Artiya
Artiya

Responses (52)