From 2daee933f6df3236d8a2f07d890b00e8637808a3 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Tue, 24 Nov 2020 01:28:24 +0100 Subject: [PATCH] hack(devservices): A hacky workaround to make docker on mac work again This works around https://github.com/docker/for-mac/issues/5025 and https://github.com/docker/docker-py/issues/2696 --- src/sentry/runner/commands/devservices.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sentry/runner/commands/devservices.py b/src/sentry/runner/commands/devservices.py index d2af56d43382f3..72bc412336bb98 100644 --- a/src/sentry/runner/commands/devservices.py +++ b/src/sentry/runner/commands/devservices.py @@ -9,6 +9,14 @@ from sentry.utils.compat import map +# Work around a stupid docker issue: https://github.com/docker/for-mac/issues/5025 +RAW_SOCKET_HACK_PATH = os.path.expanduser( + "~/Library/Containers/com.docker.docker/Data/docker.raw.sock" +) +if os.path.exists(RAW_SOCKET_HACK_PATH): + os.environ["DOCKER_HOST"] = "unix://" + RAW_SOCKET_HACK_PATH + + def get_docker_client(): import docker