diff --git a/docker-compose.development.yaml b/docker-compose.development.yaml index 5efa61628..c23ab3ec2 100644 --- a/docker-compose.development.yaml +++ b/docker-compose.development.yaml @@ -81,6 +81,9 @@ services: build: context: "./backend" dockerfile: "./Dockerfile.development" + args: + GROUP_ID: "${GROUP_ID:?required}" + USER_ID: "${USER_ID:?required}" depends_on: database: condition: "service_started" diff --git a/docker.mk b/docker.mk index 94643d4ba..5b8d15f7a 100755 --- a/docker.mk +++ b/docker.mk @@ -7,6 +7,11 @@ SHELL := /usr/bin/env bash .SHELLFLAGS := -o errexit -o errtrace -o nounset -o pipefail -c MAKEFLAGS += --warn-undefined-variables +GROUP_ID ?= $(shell id --group) +USER_ID ?= $(shell id --user) +export GROUP_ID +export USER_ID + COMPOSE_BAKE=true SERVICE= @@ -62,8 +67,8 @@ pull : ## Pull images build : symlink dotenv pull ## Build images docker compose build \ --pull \ - --build-arg GROUP_ID=$(shell id --group) \ - --build-arg USER_ID=$(shell id --user) ${SERVICE} + --build-arg GROUP_ID=$(GROUP_ID) \ + --build-arg USER_ID=$(USER_ID) ${SERVICE} .PHONY : build bake : ## Print docker-compose file equivalent bake file