diff --git a/docker-compose/Makefile b/docker-compose/Makefile index 1b7983ed19bd5ada525d91d30f45fb1d45fea012..87101b3e33fd64de37ce574b85f3484a2d2b518a 100644 --- a/docker-compose/Makefile +++ b/docker-compose/Makefile @@ -8,6 +8,11 @@ COMPOSE_FILE_ARGS := --env-file $(DOCKER_COMPOSE_ENV_FILE) $(foreach yml,$(COMPO ATTACH_COMPOSE_FILE_ARGS := $(foreach yml,$(filter-out tango.yml,$(COMPOSE_FILES)),-f $(yml)) +# The default Docker network mode is tangonet. The "host" network +# mode will make the tangodb and archiverdb ports clash, +# But we allow to overwrite it. +NETWORK_MODE ?= tangonet + # If the first make argument is "start" or "stop"... ifeq (start,$(firstword $(MAKECMDGOALS))) SERVICE_TARGET = true @@ -52,7 +57,6 @@ else ifeq ($(UNAME_S),Linux) DISPLAY ?= :0.0 - NETWORK_MODE ?= host XAUTHORITY_MOUNT := /tmp/.X11-unix:/tmp/.X11-unix XAUTHORITY ?= /hosthome/.Xauthority # /bin/sh (=dash) does not evaluate 'docker network' conditionals correctly @@ -64,12 +68,6 @@ else # Make sure that Darwin, especially from macOS Catalina on, # allows X access from our Docker containers. ADD_TO_XHOST := $(shell xhost +$(IP_ADDRESS)) - # network_mode = host doesn't work on MacOS, so fix to the internal network - ifeq ($(NETWORK_MODE),) - NETWORK_MODE := tangonet - else - NETWORK_MODE := $(NETWORK_MODE) - endif XAUTHORITY_MOUNT := $(HOME)/.Xauthority:/hosthome/.Xauthority:ro XAUTHORITY := /hosthome/.Xauthority endif