{"id":8265,"date":"2026-09-02T21:34:43","date_gmt":"2026-09-02T21:34:43","guid":{"rendered":"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/"},"modified":"2026-09-02T21:34:43","modified_gmt":"2026-09-02T21:34:43","slug":"speed-up-docker-for-mac-with-docker-sync","status":"publish","type":"post","link":"https:\/\/kutia.net\/de\/speed-up-docker-for-mac-with-docker-sync\/","title":{"rendered":"Beschleunigen Sie Docker f\u00fcr Mac mit Docker-Sync"},"content":{"rendered":"<p class=\"wp-block-paragraph\" id=\"ec2b\">Running web app on Docker on MacOS can be quite slow, especially when you run multiple containers with file sync from the host machine to containers. To help solve this problem when developing on MacOS, one of the solutions we can use is a tool called&nbsp;<a href=\"http:\/\/docker-sync.io\/\">docker-sync<\/a>.<\/p>\n<p class=\"wp-block-paragraph\" id=\"65e1\">This post will guide you step-by-step on how to set up your local machine.<\/p>\n<p><strong>WARNING<\/strong>: You should have experience with Docker and Docker Compose in advance, in order to understand the post.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-why-is-it-so-slow\">Why is it so slow?<\/h2>\n<p class=\"wp-block-paragraph\" id=\"6dc4\">The root of the problem lies in the OS file system layer between Docker and Mac. On Linux, Docker can mount directories and files directly, whereas, on Mac, Docker has to pass the request to Mac (osxfs) for each file read\/write.<\/p>\n<p class=\"wp-block-paragraph\" id=\"44a1\">There are&nbsp;two dimensions to filesystem performance: throughput and latency. Throughput is the rate at which data can be processed. Latency is the time it takes for a file system call (e.g. write to that file) to complete.<\/p>\n<p class=\"wp-block-paragraph\" id=\"fbf7\">Throughput is not the problem. Modern systems with SSDs can achieve throughput up to at least a few GBs\/second. OSXFS has a limit throughput of 250 MB\/s. While this is significantly slower than the throughput of a SSD, this typically is not a bottleneck as most applications don\u2019t read or write that much data each second.<\/p>\n<p class=\"wp-block-paragraph\" id=\"ec5e\">That leaves us with latency. Most block-based filesystems (block-based meaning the data on the disk is stored in blocks) have a latency of around 10\u03bcs (microseconds). OSXFS is about 13x slower (130\u03bcs microseconds). While it is still incredibly fast, when put to the test in a typical web app workload, like npm install, it all adds up and becomes incredibly slow.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-pre-requisites\">Pre-requisites<\/h2>\n<ol class=\"wp-block-list\">\n<li>Docker and Docker Compose must be installed<\/li>\n<li>A Docker image of your project<\/li>\n<li>Ruby is installed<\/li>\n<\/ol>\n<h2 class=\"wp-block-heading\" id=\"h-setup\">Setup<\/h2>\n<p class=\"wp-block-paragraph\"><strong>Step 1.<\/strong> Install docker sync<\/p>\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">gem install docker-sync --no-rdoc --no-ri\ndocker pull eugenmayer\/unison:2.51.2.1<\/code><\/pre>\n<p class=\"wp-block-paragraph\"><strong>Step 2.<\/strong> Create&nbsp;<code>docker-sync.yml<\/code>&nbsp;in the main directory of your project and include the following config in the file:<\/p>\n<pre class=\"wp-block-code\"><code lang=\"yaml\" class=\"language-yaml\">version: \"2\"\nsyncs:\n  app-code-sync:\n    # Source directory\n    src: '.\/src'\n    # This will exclude the files\/folders you specify.\n    sync_excludes: [\n      '.git'\n    ]\n  sync_host_ip: '127.0.0.1'\n  sync_host_port: 10872<\/code><\/pre>\n<p class=\"wp-block-paragraph\"><strong>Step 3.<\/strong> Create&nbsp;<code>docker-compose-dev.yml<\/code>&nbsp;in the main directory<\/p>\n<p class=\"wp-block-paragraph\">Imagine you have&nbsp;<code>docker_compose.yml<\/code>&nbsp;like this and you want to sync files&nbsp;folder in&nbsp;<code>.\/src<\/code>&nbsp;with docker-sync<\/p>\n<pre class=\"wp-block-code\"><code lang=\"yaml\" class=\"language-yaml\">version: '3.5'\n\nnetworks:\n  laravel:\n\nservices:\n  php:\n    build:\n      context: .\/docker\/php\n    image: 'php:alpine'\n    container_name: kutia_php\n    ports:\n      - '9000:9000'\n    volumes:\n      - .\/src:\/src\n    networks:\n      - laravel<\/code><\/pre>\n<p class=\"wp-block-paragraph\">First of all, remove the line &#8211; .\/src:\/src (it causes the container to slow down). Then add the following config to the&nbsp;<code>docker-compose-dev.yml<\/code>&nbsp;file<\/p>\n<pre class=\"wp-block-code\"><code lang=\"yaml\" class=\"language-yaml\">version: '3.5'\n\nnetworks:\n  laravel:\n\nservices:\n  php:\n    build:\n      context: .\/docker\/php\n    image: 'php:alpine'\n    container_name: kutia_php\n    ports:\n      - '9000:9000'\n    volumes:\n      - app-code-sync:\/src:nocopy\n    networks:\n      - laravel\n\nvolumes:\n  app-code-sync:\n    external: true<\/code><\/pre>\n<p class=\"wp-block-paragraph\"><strong>Step 4.<\/strong> Start docker-sync<\/p>\n<pre class=\"wp-block-code\"><code lang=\"docker\" class=\"language-docker\">docker-sync start<\/code><\/pre>\n<p class=\"wp-block-paragraph\">If you&nbsp;want to stop, then replace&nbsp;<code>start<\/code>&nbsp;with&nbsp;<code>stop<\/code>&nbsp;. To clean up the log and reset docker-sync, use&nbsp;<code>clean<\/code>&nbsp;.<\/p>\n<p><strong>Step 5.<\/strong> Start containers with Docker Compose<\/p>\n<pre class=\"wp-block-code\"><code lang=\"docker\" class=\"language-docker\">docker-compose -f docker-compose.yml -f docker-compose-dev.yml up -d<\/code><\/pre>\n<p class=\"wp-block-paragraph\">To check if everything is running properly, run&nbsp;<code>docker-compose ps<\/code>&nbsp;and check for the names of the container with&nbsp;<code>app-code-sync<\/code>&nbsp;and&nbsp;<code>kutia_php<\/code>&nbsp;. If they exist, then hooray! Your app is now up and running with docker-sync.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Das Ausf\u00fchren einer Webanwendung auf Docker unter MacOS kann recht langsam sein, insbesondere wenn Sie mehrere Container mit Dateisynchronisierung vom Hostcomputer zu den Containern ausf\u00fchren. <\/p>\n","protected":false},"author":0,"featured_media":2966,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[49],"tags":[],"class_list":["post-8265","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-unkategorisiert"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Speed up Docker for Mac with docker-sync - Kutia<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Speed up Docker for Mac with docker-sync - Kutia\" \/>\n<meta property=\"og:description\" content=\"Das Ausf\u00fchren einer Webanwendung auf Docker unter MacOS kann recht langsam sein, insbesondere wenn Sie mehrere Container mit Dateisynchronisierung vom Hostcomputer zu den Containern ausf\u00fchren.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Kutia\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-02T21:34:43+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kutia.net\\\/speed-up-docker-for-mac-with-docker-sync-2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kutia.net\\\/speed-up-docker-for-mac-with-docker-sync-2\\\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Beschleunigen Sie Docker f\u00fcr Mac mit Docker-Sync\",\"datePublished\":\"2026-09-02T21:34:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kutia.net\\\/speed-up-docker-for-mac-with-docker-sync-2\\\/\"},\"wordCount\":7,\"image\":{\"@id\":\"https:\\\/\\\/kutia.net\\\/speed-up-docker-for-mac-with-docker-sync-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kutia.net\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/Speedup-DockerMacOs.webp\",\"articleSection\":[\"Unkategorisiert\"],\"inLanguage\":\"de-DE\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kutia.net\\\/speed-up-docker-for-mac-with-docker-sync-2\\\/\",\"url\":\"https:\\\/\\\/kutia.net\\\/speed-up-docker-for-mac-with-docker-sync-2\\\/\",\"name\":\"Speed up Docker for Mac with docker-sync - Kutia\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kutia.net\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/kutia.net\\\/speed-up-docker-for-mac-with-docker-sync-2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/kutia.net\\\/speed-up-docker-for-mac-with-docker-sync-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kutia.net\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/Speedup-DockerMacOs.webp\",\"datePublished\":\"2026-09-02T21:34:43+00:00\",\"author\":{\"@id\":\"\"},\"inLanguage\":\"de-DE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kutia.net\\\/speed-up-docker-for-mac-with-docker-sync-2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de-DE\",\"@id\":\"https:\\\/\\\/kutia.net\\\/speed-up-docker-for-mac-with-docker-sync-2\\\/#primaryimage\",\"url\":\"https:\\\/\\\/kutia.net\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/Speedup-DockerMacOs.webp\",\"contentUrl\":\"https:\\\/\\\/kutia.net\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/Speedup-DockerMacOs.webp\",\"width\":1200,\"height\":630,\"caption\":\"Speed up Docker for Mac with docker-sync\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kutia.net\\\/#website\",\"url\":\"https:\\\/\\\/kutia.net\\\/\",\"name\":\"Kutia\",\"description\":\"Custom software, team augmentation, IT recruitment\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kutia.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de-DE\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Speed up Docker for Mac with docker-sync - Kutia","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/","og_locale":"de_DE","og_type":"article","og_title":"Speed up Docker for Mac with docker-sync - Kutia","og_description":"Das Ausf\u00fchren einer Webanwendung auf Docker unter MacOS kann recht langsam sein, insbesondere wenn Sie mehrere Container mit Dateisynchronisierung vom Hostcomputer zu den Containern ausf\u00fchren.","og_url":"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/","og_site_name":"Kutia","article_published_time":"2026-09-02T21:34:43+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/#article","isPartOf":{"@id":"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/"},"author":{"name":"","@id":""},"headline":"Beschleunigen Sie Docker f\u00fcr Mac mit Docker-Sync","datePublished":"2026-09-02T21:34:43+00:00","mainEntityOfPage":{"@id":"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/"},"wordCount":7,"image":{"@id":"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/#primaryimage"},"thumbnailUrl":"https:\/\/kutia.net\/wp-content\/uploads\/2021\/04\/Speedup-DockerMacOs.webp","articleSection":["Unkategorisiert"],"inLanguage":"de-DE"},{"@type":"WebPage","@id":"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/","url":"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/","name":"Speed up Docker for Mac with docker-sync - Kutia","isPartOf":{"@id":"https:\/\/kutia.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/#primaryimage"},"image":{"@id":"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/#primaryimage"},"thumbnailUrl":"https:\/\/kutia.net\/wp-content\/uploads\/2021\/04\/Speedup-DockerMacOs.webp","datePublished":"2026-09-02T21:34:43+00:00","author":{"@id":""},"inLanguage":"de-DE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/"]}]},{"@type":"ImageObject","inLanguage":"de-DE","@id":"https:\/\/kutia.net\/speed-up-docker-for-mac-with-docker-sync-2\/#primaryimage","url":"https:\/\/kutia.net\/wp-content\/uploads\/2021\/04\/Speedup-DockerMacOs.webp","contentUrl":"https:\/\/kutia.net\/wp-content\/uploads\/2021\/04\/Speedup-DockerMacOs.webp","width":1200,"height":630,"caption":"Speed up Docker for Mac with docker-sync"},{"@type":"WebSite","@id":"https:\/\/kutia.net\/#website","url":"https:\/\/kutia.net\/","name":"Kutia","description":"Custom software, team augmentation, IT recruitment","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kutia.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de-DE"}]}},"_links":{"self":[{"href":"https:\/\/kutia.net\/de\/wp-json\/wp\/v2\/posts\/8265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kutia.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kutia.net\/de\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/kutia.net\/de\/wp-json\/wp\/v2\/comments?post=8265"}],"version-history":[{"count":0,"href":"https:\/\/kutia.net\/de\/wp-json\/wp\/v2\/posts\/8265\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kutia.net\/de\/wp-json\/wp\/v2\/media\/2966"}],"wp:attachment":[{"href":"https:\/\/kutia.net\/de\/wp-json\/wp\/v2\/media?parent=8265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kutia.net\/de\/wp-json\/wp\/v2\/categories?post=8265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kutia.net\/de\/wp-json\/wp\/v2\/tags?post=8265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}