diff --git a/docker-compose/Makefile b/docker-compose/Makefile
index 1f7f204b8c5bee0f53a5e36e79c90df0e8884963..3a48a9187b71504941c314ec5049e9e3ed4cf495 100644
--- a/docker-compose/Makefile
+++ b/docker-compose/Makefile
@@ -55,7 +55,7 @@ else
 	endif
 	ifeq ($(UNAME_S),Darwin)
 		IF_INTERFACE := $(shell netstat -nr | awk '{ if ($$1 ~/default/) { print $$6} }')
-		DISPLAY := $(shell ifconfig $(IF_INTERFACE) | awk '{ if ($$1 ~/inet/) { print $$2} }'):0
+		DISPLAY := $(shell ifconfig $(IF_INTERFACE) | awk '{ if ($$1 ~/inet$$/) { print $$2} }'):0
 		# network_mode = host doesn't work on MacOS, so fix to the internal network
 		NETWORK_MODE ?= tangonet
 		XAUTHORITY_MOUNT := $(HOME)/.Xauthority:/hosthome/.Xauthority:ro