Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docker-compose.development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ services:
build:
context: "./backend"
dockerfile: "./Dockerfile.${ENVIRONMENT:?required}"
args:
GROUP_ID: "${GROUP_ID:?required}"
USER_ID: "${USER_ID:?required}"
depends_on:
database:
condition: "service_started"
Expand Down
9 changes: 7 additions & 2 deletions docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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=

Expand Down Expand Up @@ -63,8 +68,8 @@ build : symlink dotenv pull ## Build images
if [[ "${ENVIRONMENT}" == "development" ]]; then \
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} ; \
else \
$(MAKE) --file=./forge.mk \
build \
Expand Down