diff --git a/docker-compose/Makefile b/docker-compose/Makefile index 0e283f7ab70c053d79c147870fad7ed42948af7c..ef3d06024d4816321aa902a8c9793fd4e35b6f8f 100644 --- a/docker-compose/Makefile +++ b/docker-compose/Makefile @@ -49,8 +49,7 @@ else ifeq ($(UNAME_S),Linux) DISPLAY ?= :0.0 NETWORK_MODE ?= host - XAUTHORITY_FILE ?= /tmp/.X11-unix - XAUTHORITY_MOUNT := $(XAUTHORITY_FILE):/tmp/.X11-unix + XAUTHORITY_MOUNT := /tmp/.X11-unix:/tmp/.X11-unix XAUTHORITY ?= /hosthome/.Xauthority # /bin/sh (=dash) does not evaluate 'docker network' conditionals correctly SHELL := /bin/bash @@ -64,8 +63,7 @@ else ADD_TO_XHOST := $(shell xhost +$(IP_ADDRESS)) # network_mode = host doesn't work on MacOS, so fix to the internal network NETWORK_MODE ?= tangonet - XAUTHORITY_FILE ?= $(HOME)/.Xauthority - XAUTHORITY_MOUNT := $(XAUTHORITY_FILE):/hosthome/.Xauthority:ro + XAUTHORITY_MOUNT := $(HOME)/.Xauthority:/hosthome/.Xauthority:ro XAUTHORITY := /hosthome/.Xauthority endif endif @@ -109,7 +107,7 @@ endif $(DOCKER_COMPOSE_ARGS) docker-compose -f tango.yml up -d start: up ## start a service (usage: make start <servicename>) - if [ $(UNAME_S) = Linux ]; then chmod a+r $(XAUTHORITY_FILE); fi + if [ $(UNAME_S) = Linux ]; then chmod a+r ~/.Xauthority; fi $(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) start $(SERVICE) stop: ## stop a service (usage: make stop <servicename>)