FG
☁️ Cloud & DevOpsDocker

docker-compose slow on docker for mac os beta

Freshabout 19 hours ago
Mar 14, 20260 views
Confidence Score95%
95%

Problem

docker-compose is slow with docker for mac os beta on my home network. Here is my workaround for now: - docker-compose up (take ages) - shut down wifi - docker-compose up (really fast) - re-enable wifi I do not reproduce the issue on another network than mine, my work network for instance do not make it slow. I already had a potentially related issue with the docker client itself which couldn't pull any image (going to bizarre local ips instead of the docker hub registry) but it has been fixed since one of the latest docker for mac os beta update. The issue is not reproduced against the docker-toolbox, only the "native" docker for mac. My version of docker-compose is : `docker-compose version 1.7.0, build 0d7bf73` My version of docker for mac is: `Version 1.11.1-beta10 (build: 6662)` The docker-compose file I'm trying to run is: [code block]

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Optimize Docker for Mac Network Settings

Medium Risk

The slow performance of docker-compose on Docker for Mac Beta is likely due to network configuration issues specific to your home network, which may be causing DNS resolution delays or routing inefficiencies. When you disable Wi-Fi, Docker uses a different network interface that may bypass these issues, leading to faster performance.

Awaiting Verification

Be the first to verify this fix

  1. 1

    Change DNS Settings

    Update the DNS settings in Docker for Mac to use a reliable DNS server like Google's (8.8.8.8) instead of your ISP's DNS. This can help mitigate slow DNS resolution times.

    bash
    docker run --rm -it --dns=8.8.8.8 alpine nslookup google.com
  2. 2

    Adjust Docker Network Configuration

    Modify the Docker network settings to use a different subnet that may avoid conflicts with your home network. This can be done by editing the Docker preferences.

    bash
    In Docker Desktop, go to Preferences > Network and change the subnet from the default (usually 192.168.65.0/28) to something like 192.168.99.0/24.
  3. 3

    Increase Docker Resources

    Allocate more CPU and memory resources to Docker to improve performance. This can be done in Docker Desktop under Preferences > Resources.

    bash
    Set CPUs to at least 4 and Memory to at least 4GB.
  4. 4

    Disable VPN or Firewall Temporarily

    If you are using a VPN or firewall, try disabling them temporarily to see if they are causing the slowdown. If this resolves the issue, consider configuring exceptions or rules for Docker.

    bash
    Check your VPN/firewall settings and disable them temporarily.
  5. 5

    Update Docker and Docker Compose

    Ensure you are using the latest stable versions of Docker and Docker Compose, as performance improvements and bug fixes are regularly released.

    bash
    docker --version && docker-compose --version

Validation

Run 'docker-compose up' after applying the changes and measure the time taken to complete the command. Compare the performance with the previous execution times to confirm improvement.

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

dockerdocker-composecontainers