make: add UID as --build-arg

Allow to give the user running inside docker the same UID as the user
outside.

Change-Id: I4b3689a626c50c9ac38eca6b5449b8ec0344c3de
This commit is contained in:
Oliver Smith 2021-04-28 17:22:01 +02:00 committed by osmith
parent d883114318
commit d3359e2bce
1 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,7 @@
#
REGISTRY_HOST?=docker.io
USERNAME?=$(USER)
UID=$(shell id -u)
NAME?=$(shell basename $(CURDIR))
LIBOSMOCORE_BRANCH?=master
OSMO_TTCN3_BRANCH?=master
@ -69,6 +70,7 @@ post-push:
docker-build: .release
docker build \
--build-arg USER=$(USERNAME) \
--build-arg UID=$(UID) \
--build-arg REGISTRY=$(REGISTRY_HOST) \
--build-arg OSMO_TTCN3_BRANCH=$(OSMO_TTCN3_BRANCH) \
--build-arg UPSTREAM_DISTRO=$(UPSTREAM_DISTRO) \