fedora-dev: carry over uid and gid
This commit is contained in:
parent
57c47d0cdc
commit
398f7fd419
2 changed files with 8 additions and 2 deletions
|
@ -33,7 +33,8 @@ RUN yum erase -y vim-minimal && \
|
||||||
tito && \
|
tito && \
|
||||||
yum update -y && \
|
yum update -y && \
|
||||||
yum clean all && \
|
yum clean all && \
|
||||||
useradd -m -u 1000 -G wheel,mock DEV_USER && \
|
groupadd -g DEV_GID DEV_USER && \
|
||||||
|
useradd -m -u DEV_UID -g DEV_GID -G wheel,mock DEV_USER && \
|
||||||
sed -ri 's/^(%wheel.*)(ALL)$/\1NOPASSWD: \2/' /etc/sudoers
|
sed -ri 's/^(%wheel.*)(ALL)$/\1NOPASSWD: \2/' /etc/sudoers
|
||||||
USER DEV_USER
|
USER DEV_USER
|
||||||
ENV HOME /home/DEV_USER
|
ENV HOME /home/DEV_USER
|
||||||
|
|
|
@ -10,7 +10,12 @@ NAME ?= $(REGISTRY)/$(USER)/$(FROM_IMAGE)-dev:$(FROM_TAG)
|
||||||
default: build
|
default: build
|
||||||
|
|
||||||
Dockerfile: Dockerfile.in
|
Dockerfile: Dockerfile.in
|
||||||
m4 --define=DEV_USER=$(USER) --define=FROM_IMAGE=$(FROM) $< > $@
|
m4 \
|
||||||
|
--define=DEV_USER=$(USER) \
|
||||||
|
--define=DEV_UID=$(shell id -u $(USER)) \
|
||||||
|
--define=DEV_GID=$(shell id -g $(USER)) \
|
||||||
|
--define=FROM_IMAGE=$(FROM) \
|
||||||
|
$< > $@
|
||||||
|
|
||||||
build: .build
|
build: .build
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue