Skip to content
Snippets Groups Projects
Commit 76286f5c authored by Jan David Mol's avatar Jan David Mol
Browse files

Merge branch 'Fix_getent_not_available_on_macOS' into 'master'

Add support for DOCKER_GID on macOS

Closes #10

See merge request !242
parents 53f8b46e ee029334
Branches
Tags
1 merge request!242Add support for DOCKER_GID on macOS
......@@ -77,12 +77,14 @@ else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
DOCKER_GID ?= $(shell getent group docker | cut -d: -f 3)
DISPLAY ?= :0.0
XAUTHORITY_MOUNT := /tmp/.X11-unix:/tmp/.X11-unix
XAUTHORITY ?= /hosthome/.Xauthority
# /bin/sh (=dash) does not evaluate 'docker network' conditionals correctly
SHELL := /bin/bash
else ifeq ($(UNAME_S),Darwin)
DOCKER_GID ?= $(shell id -g)
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)
DISPLAY := $(IP_ADDRESS):0
......@@ -126,7 +128,7 @@ DOCKER_COMPOSE_ARGS := DISPLAY=$(DISPLAY) \
CONTAINER_NAME_PREFIX=$(CONTAINER_NAME_PREFIX) \
COMPOSE_IGNORE_ORPHANS=true \
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment