Merge pull request #95 from valentinvieriu/bionic-lxqt
allow to run as another user as root
This commit is contained in:
commit
6c58585ec8
|
|
@ -5,6 +5,7 @@ make run
|
||||||
```
|
```
|
||||||
|
|
||||||
You can overwrite the local Ubuntu repo using `make LOCALBUILD=de build`.
|
You can overwrite the local Ubuntu repo using `make LOCALBUILD=de build`.
|
||||||
|
You can run the image as adifferent user `make CUSTOM_USER=newuser run`.
|
||||||
|
|
||||||
## develop backend
|
## develop backend
|
||||||
```
|
```
|
||||||
|
|
|
||||||
7
Makefile
7
Makefile
|
|
@ -4,6 +4,9 @@ REPO ?= dorowu/ubuntu-desktop-lxde-vnc
|
||||||
TAG ?= latest
|
TAG ?= latest
|
||||||
IMAGE ?= ubuntu:18.04
|
IMAGE ?= ubuntu:18.04
|
||||||
LOCALBUILD ?= tw
|
LOCALBUILD ?= tw
|
||||||
|
HTTP_PASSWORD ?= 123456
|
||||||
|
CUSTOM_USER ?= ubuntu
|
||||||
|
PASSWORD ?= ubuntu
|
||||||
|
|
||||||
build:
|
build:
|
||||||
docker build -t $(REPO):$(TAG) --build-arg localbuild=$(LOCALBUILD) --build-arg image=$(IMAGE) .
|
docker build -t $(REPO):$(TAG) --build-arg localbuild=$(LOCALBUILD) --build-arg image=$(IMAGE) .
|
||||||
|
|
@ -12,7 +15,9 @@ run:
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-p 6080:80 -p 6081:443 \
|
-p 6080:80 -p 6081:443 \
|
||||||
-v ${PWD}:/src:ro \
|
-v ${PWD}:/src:ro \
|
||||||
-e HTTP_PASSWORD=123456 \
|
-e HTTP_PASSWORD=$(HTTP_PASSWORD) \
|
||||||
|
-e USER=$(CUSTOM_USER) \
|
||||||
|
-e PASSWORD=$(PASSWORD) \
|
||||||
--name ubuntu-desktop-lxde-test \
|
--name ubuntu-desktop-lxde-test \
|
||||||
$(REPO):$(TAG)
|
$(REPO):$(TAG)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ if [ "$USER" != "root" ]; then
|
||||||
fi
|
fi
|
||||||
HOME=/home/$USER
|
HOME=/home/$USER
|
||||||
echo "$USER:$PASSWORD" | chpasswd
|
echo "$USER:$PASSWORD" | chpasswd
|
||||||
cp -r /root/{.gtkrc-2.0,.asoundrc} ${HOME}
|
cp -r /root/{.config,.gtkrc-2.0,.asoundrc} ${HOME}
|
||||||
[ -d "/dev/snd" ] && chgrp -R adm /dev/snd
|
[ -d "/dev/snd" ] && chgrp -R adm /dev/snd
|
||||||
fi
|
fi
|
||||||
sed -i "s|%USER%|$USER|" /etc/supervisor/conf.d/supervisord.conf
|
sed -i "s|%USER%|$USER|" /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue