mirror of
https://github.com/falk-werner/webfuse
synced 2024-10-27 20:34:10 +00:00
changes user id mapping
This commit is contained in:
parent
1d82e0a71f
commit
12e7af6df7
@ -1,3 +1,4 @@
|
||||
language: minimal
|
||||
services:
|
||||
- docker
|
||||
addons:
|
||||
|
8
Makefile
8
Makefile
@ -10,8 +10,9 @@ PROJECT_ROOT ?= .
|
||||
OUT ?= $(PROJECT_ROOT)/.build
|
||||
VERSION ?= $(shell cat $(PROJECT_ROOT)/VERSION)
|
||||
NPROC ?= $(shell nproc)
|
||||
UID ?= $(shell id -u)
|
||||
DOCKER ?= docker
|
||||
DOCKER_RUNUSER ?= $(shell id -u)
|
||||
DOCKER_RUNUSER ?= $(UID)
|
||||
DOCKER_RUNGROUP ?= $(shell id -g)
|
||||
|
||||
UBUNTU_CODENAME ?= bionic
|
||||
@ -28,13 +29,14 @@ $(MARCH_ARM32V7)TARGETS += wsfs-builder-arm32v7-ubuntu
|
||||
DOCKER_RUNFLAGS += --interactive
|
||||
DOCKER_RUNFLAGS += --rm
|
||||
DOCKER_RUNFLAGS += --tty
|
||||
DOCKER_RUNFLAGS += --init
|
||||
DOCKER_RUNFLAGS += --init
|
||||
DOCKER_RUNFLAGS += --user $(DOCKER_RUNUSER):$(DOCKER_RUNGROUP)
|
||||
DOCKER_RUNFLAGS += --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined
|
||||
DOCKER_RUNFLAGS += --env SOURCE_DATE_EPOCH
|
||||
|
||||
DOCKER_BUILDARGS += CODENAME=$(CODENAME)
|
||||
DOCKER_BUILDARGS += NPROC=$(NPROC)
|
||||
DOCKER_BUILDARGS += USERID=$(UID)
|
||||
|
||||
DOCKER_BUILDFLAGS += $(addprefix --build-arg ,$(DOCKER_BUILDARGS))
|
||||
|
||||
@ -103,7 +105,7 @@ $(OUT)/%/CMakeCache.txt: $(PROJECT_ROOT)/CMakeLists.txt $(OUT)/docker/% | $(OUT_
|
||||
cmake -GNinja $(CMAKEFLAGS) .. && touch $@
|
||||
|
||||
$(CHECK_TARGETS): GLOAS := test
|
||||
$(CHECK_TARGETS): DOCKER_RUNUSER := test
|
||||
$(CHECK_TARGETS): DOCKER_RUNUSER := user
|
||||
|
||||
check-%: compile-%;
|
||||
|
||||
|
@ -73,6 +73,8 @@ RUN set -x \
|
||||
|
||||
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
|
||||
|
||||
RUN useradd -ms /bin/bash test
|
||||
ARG USERID=1000
|
||||
|
||||
RUN useradd -u $USERID -ms /bin/bash user
|
||||
|
||||
|
||||
|
@ -75,6 +75,9 @@ RUN set -x \
|
||||
|
||||
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
|
||||
|
||||
RUN useradd -ms /bin/bash test
|
||||
ARG USERID=1000
|
||||
|
||||
RUN useradd -u $USERID -ms /bin/bash user
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user