Skip to content
Snippets Groups Projects
Commit ee029334 authored by Thomas Juerges's avatar Thomas Juerges
Browse files

Add support for DOCKER_GID on macOS

parent a093b491
No related branches found
No related tags found
1 merge request!242Add support for DOCKER_GID on macOS
...@@ -77,12 +77,14 @@ else ...@@ -77,12 +77,14 @@ else
UNAME_S := $(shell uname -s) UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux) ifeq ($(UNAME_S),Linux)
DOCKER_GID ?= $(shell getent group docker | cut -d: -f 3)
DISPLAY ?= :0.0 DISPLAY ?= :0.0
XAUTHORITY_MOUNT := /tmp/.X11-unix:/tmp/.X11-unix XAUTHORITY_MOUNT := /tmp/.X11-unix:/tmp/.X11-unix
XAUTHORITY ?= /hosthome/.Xauthority XAUTHORITY ?= /hosthome/.Xauthority
# /bin/sh (=dash) does not evaluate 'docker network' conditionals correctly # /bin/sh (=dash) does not evaluate 'docker network' conditionals correctly
SHELL := /bin/bash SHELL := /bin/bash
else ifeq ($(UNAME_S),Darwin) else ifeq ($(UNAME_S),Darwin)
DOCKER_GID ?= $(shell id -g)
IF_INTERFACE := $(shell scutil --nwi | grep 'Network interfaces:' | cut -d' ' -f3) IF_INTERFACE := $(shell scutil --nwi | grep 'Network interfaces:' | cut -d' ' -f3)
IP_ADDRESS := $(shell scutil --nwi | grep 'address' | cut -d':' -f2 | tr -d ' ' | head -n1) IP_ADDRESS := $(shell scutil --nwi | grep 'address' | cut -d':' -f2 | tr -d ' ' | head -n1)
DISPLAY := $(IP_ADDRESS):0 DISPLAY := $(IP_ADDRESS):0
...@@ -126,7 +128,7 @@ DOCKER_COMPOSE_ARGS := DISPLAY=$(DISPLAY) \ ...@@ -126,7 +128,7 @@ DOCKER_COMPOSE_ARGS := DISPLAY=$(DISPLAY) \
CONTAINER_NAME_PREFIX=$(CONTAINER_NAME_PREFIX) \ CONTAINER_NAME_PREFIX=$(CONTAINER_NAME_PREFIX) \
COMPOSE_IGNORE_ORPHANS=true \ COMPOSE_IGNORE_ORPHANS=true \
CONTAINER_EXECUTION_UID=$(shell id -u) \ CONTAINER_EXECUTION_UID=$(shell id -u) \
DOCKER_GID=$(shell getent group docker | cut -d: -f 3) DOCKER_GID=$(DOCKER_GID)
.PHONY: up down minimal start stop restart build build-nocache status clean pull help .PHONY: up down minimal start stop restart build build-nocache status clean pull help
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment