If you are developing inside Docker containers on macOS, you’ve probably faced the dreaded, coffee-break-inducing startup times. Here is how I slashed my container spin-up times from a painful 10 minutes down to just under 4 seconds using Docker Sync.

I hit a brick wall when I was thrown into a development environment that was containerized to the bone. Having almost zero Docker experience, I felt like a five-year-old who was handed A Practical Guide to the UNIX System and expected a coloring book.
The tinkerer in me shouted, “This is even better! More buttons to push!” Fast forward to today, after spending some real time in the codebaseβthe initial excitement has definitely worn off.
It was taking 10 minutes to start a clean project. Ten minutes! That couldn’t be right. I usually never question why things seem broken, but this was unbearable. That is when I found the solution: Docker Sync.
The Problem: macOS Virtualization Overhead#
So, what exactly was causing the bottleneck?
On macOS and Windows, Docker runs inside a virtualized Linux VM. Because of this, standard volume sharing (bind mounts) incurs a massive performance penalty during file-read and file-write operations.
Whenever I rebuilt containers, updated packages, or tested code changes (and inevitably wrote new bugs π), the volume synchronization took up to 10 minutes. It was incredibly tedious.
Here is the solution that worked for me.
Directory Structure#
Here is how the project example is laid out:
vanilla/ # β Root of example
βββ docker/ # β Data for containers
β βββ strapi
βββ src/ # β Source files
β βββ Source files
βββ .env # β Environment files
βββ .docker-compose-dev.yml # β Setup files for editor overrides
βββ .docker-sync.yml # β Basic sync configuration
βββ .docker-compose.yml # β Base services configuration
βββ README.md # β Project documentationInstallation & Setup#
Follow these six steps to get Docker Sync up and running.
1. Install Docker Sync#
Run the gem installation command in your terminal:
gem install --user-install docker-sync2. Configure docker-sync.yml#
Create a .docker-sync.yml file in your root folder:
version: "2"
syncs:
vanilla:
notify_terminal: true
src: "./"
sync_excludes: [".git", ".idea", "node_modules"]3. Create a Developer Compose Override#
Create a .docker-compose-dev.yml file to define the sync volume mounts:
version: "2"
services:
nginx:
volumes:
- vanilla:/app:nocopy
strapi:
volumes:
- vanilla:/app:nocopy
volumes:
vanilla:
external: true4. Initialize and Run the Sync Stack#
Launch the synchronization daemon and stack:
docker-sync-stack start5. Run in the Background#
Alternatively, run only the sync daemon in the background:
docker-sync start6. Start Your Containers#
Wait for the initial sync to finish, then launch your project with both compose files:
docker-compose -f docker-compose.yml -f docker-compose-dev.yml upThe Results#
In my setup, container build speeds dropped from 4 minutes down to 3β4 seconds.
While 4 minutes doesn’t sound like eternity, those times add up quickly when you are doing clean rebuilds or testing fresh branches.
Special thanks to freepik for the awesome icons!
What’s your setup?#
Have you transitioned to newer virtualization frameworks like VirtioFS in Docker Desktop, or are you still utilizing Docker Sync? Let’s discuss in the comments below!

