Docker Compose vs Kaspersky

Description of the issue

Running docker-compose is extremely slow. Even simple tasks like docker-compose --version are taking more than 10 minutes. Looking into the Activity Monitor on my Macbook i can clearly see that the process kav is immediately taking over all the CPU of my machine. This is an anti-virus (Kaspersky) process.

So the question is:
Why is a simple command like checking the version number such an issue?

I also followed the advice given in the docker documentation to add the docker data directory to Kaspersky’s exclusion list.

While this appears to improve the time of docker-compose up, its still taking a long time.

Fun fact:
Running all the commands for this bug report took around 50 minutes. 😁

Context information (for bug reports)

Output of docker-compose version

docker-compose version 1.26.2, build eefe0d31

Output of docker version

Docker version 19.03.12, build 48a66213fe

Steps to reproduce the issue

  1. Install Kaspersky Endpoint Security and Docker Compose
  2. Run docker-compose --version

Observed result

Very long execution time. (> 10 minutes)

Expected result

Very short execution time. E.g. like for docker --version (< 1 second).

Additional information

OS version / distribution: macOS Mojave (10.14.6)
docker-compose install method: Docker Desktop for Mac

1 possible answer(s) on “Docker Compose vs Kaspersky

  1. A small update from my side:
    I checked if a manually installed version of docker-compose would have the same issues. This is not the case. docker-compose is running fast again with this approach. So installing docker-compose manually and overwriting the link to it is the current workaround for me.

    For anyone interested here are the steps with homebrew after the installation of “Docker for Mac”:
    brew reinstall docker-compose
    brew link --overwrite docker-compose

    This way all docker-compose calls will now call your manually installed version. I also did some testing what happens when “Docker for Mac” performs an update. Its basically overwriting the link again to point to the docker-compose inside the application. Which is nice. Should prevent unwanted side effects after upgrading in the future.

    A real solution would be awesome nevertheless.