diff --git a/bin/start b/bin/start index 78e8c1d..28726d6 100755 --- a/bin/start +++ b/bin/start @@ -10,5 +10,6 @@ docker run \ -d \ --name work \ -v /:/hostroot \ + -v /home/sneak:/hosthome \ -v /var/run/docker.sock:/var/run/docker.sock \ sneak/work diff --git a/build/run.sh b/build/run.sh index 7bbe2da..13a4c13 100644 --- a/build/run.sh +++ b/build/run.sh @@ -1,5 +1,9 @@ #!/bin/bash +echo "##### build/run.sh" + +set -x + TD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)" cd "$TD" @@ -19,9 +23,11 @@ for FN in $SSH_HOST_KEY_FILES ; do ln -s /hostroot/etc/ssh/$FN /etc/ssh/$FN done +ln -s /hostroot/root /root/.home + # install other stuff here -# update pip +pip install -U pip # install black # install python packages # install yarn diff --git a/build/runuser.sh b/build/runuser.sh index 0e9729d..159f954 100644 --- a/build/runuser.sh +++ b/build/runuser.sh @@ -2,16 +2,18 @@ TD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)" +U="$USERNAME_TO_ADD" + # original home -OH="/hostroot/home/$USER_TO_ADD" +OH="/hosthome" # container home -export HOME="/home/$USER_TO_ADD" +export HOME="/home/$U" rsync -avP /home/template/ $HOME/ # link ~/.home to original home -ln -s "/hostroot/home/$USER_TO_ADD" $HOME/.home +ln -s "/hosthome" $HOME/.home # oh-my-zsh curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh > /tmp/installomz.sh @@ -22,5 +24,5 @@ bash /tmp/installomz.sh --unattended --keep-zshrc ln -s ~/.home/.ssh/id_rsa ~/.ssh/id_rsa ln -s ~/.home/.ssh/id_rsa.pub ~/.ssh/id_rsa.pub -# move this to runtime +# move this to runtime FIXME #DEVDIR="$( cd ~/.home/dev >/dev/null 2>&1 && pwd -P)"