From 4127d1d8b1ccd89ebede552544bbe670fd8739ca Mon Sep 17 00:00:00 2001 From: sneak Date: Sat, 11 Apr 2020 12:59:14 -0700 Subject: [PATCH] move /home/$USERNAME to always be /home/user --- Dockerfile | 2 +- build/run.sh | 1 - build/runuser.sh | 5 ----- root/home/{template => user}/.toprc | 0 root/home/{template => user}/.vimrc | 0 5 files changed, 1 insertion(+), 7 deletions(-) rename root/home/{template => user}/.toprc (100%) rename root/home/{template => user}/.vimrc (100%) diff --git a/Dockerfile b/Dockerfile index cde019c..94420ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN \ apt -y upgrade && \ apt -y install $SYSTEM_PACKAGES && \ groupadd -g $GID_TO_ADD $USERNAME_TO_ADD && \ - useradd -u $UID_TO_ADD -g $GID_TO_ADD -s /bin/bash $USERNAME_TO_ADD && \ + useradd -u $UID_TO_ADD -g $GID_TO_ADD --home-dir /home/user -s /bin/bash $USERNAME_TO_ADD && \ usermod -p '*' $USERNAME_TO_ADD && \ echo $USERNAME_TO_ADD > /etc/workuser && \ go get -v -u github.com/peterbourgon/runsvinit && \ diff --git a/build/run.sh b/build/run.sh index ff98cb4..4985cad 100644 --- a/build/run.sh +++ b/build/run.sh @@ -35,7 +35,6 @@ pip3 install black # install vim-go sudo \ - --preserve-env=USERNAME_TO_ADD \ --set-home \ --non-interactive \ -u $USERNAME_TO_ADD \ diff --git a/build/runuser.sh b/build/runuser.sh index 01662ff..3dd692c 100644 --- a/build/runuser.sh +++ b/build/runuser.sh @@ -11,11 +11,6 @@ U="$USERNAME_TO_ADD" # original home OH="/hosthome" -# container home -export HOME="/home/$U" - -rsync -avP /home/template/ $HOME/ - # link ~/.home to original home ln -s "/hosthome" $HOME/.home diff --git a/root/home/template/.toprc b/root/home/user/.toprc similarity index 100% rename from root/home/template/.toprc rename to root/home/user/.toprc diff --git a/root/home/template/.vimrc b/root/home/user/.vimrc similarity index 100% rename from root/home/template/.vimrc rename to root/home/user/.vimrc