From b8e07ccce3635cc963388a717e20d35dd5dd1ba5 Mon Sep 17 00:00:00 2001 From: Jackson Delahunt Date: Sun, 13 Jan 2019 19:38:42 +1100 Subject: [PATCH] fixes --- scripts/bootstrap-host.sh | 23 +++++++++++++++++------ scripts/bootstrap-volumes.sh | 9 +++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/scripts/bootstrap-host.sh b/scripts/bootstrap-host.sh index 909fb19..9a94eba 100755 --- a/scripts/bootstrap-host.sh +++ b/scripts/bootstrap-host.sh @@ -1,17 +1,28 @@ -# Host machine user configuration -HOST_HOME=$HOME +# Host user configuration HOST_USER=$(whoami) +HOST_HOME=$HOME -# Allow connections from docker containers to the host machine's X server +# Container user configuration +CONTAINER_USER=jackson +CONTAINER_HOME=/$CONTAINER_USER/home + +# Install docker on the host +apt update && apt install --yes \ + docker.io + +# Add the container user to the docker group on the host +usermod -aG docker $CONTAINER_USER + +# Allow connections from docker containers to the host's X server xhost local:docker -# Enable password-less sudo for the user on the host machine +# Enable password-less sudo for the container user on the host echo "$HOST_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers -# Install alacritty +# Install alacritty on the host wget -q -O alacritty.deb https://github.com/jwilm/alacritty/releases/download/v0.2.5/Alacritty-v0.2.5_amd64.deb && \ dpkg -i alacritty.deb && \ rm alacritty.deb -# Install the latest alacritty config on the host machine +# Install the latest alacritty config on the host wget -q -O $HOST_HOME/.config/alacritty/alacritty.yml https://raw.githubusercontent.com/sabrehagen/dotfiles-alacritty/master/.config/alacritty/alacritty.yml diff --git a/scripts/bootstrap-volumes.sh b/scripts/bootstrap-volumes.sh index c60c6c7..50b8884 100755 --- a/scripts/bootstrap-volumes.sh +++ b/scripts/bootstrap-volumes.sh @@ -1,10 +1,7 @@ -# Jackson container user configuration +# Jackson container volumes configuration CONTAINER_USER=jackson -CONTAINER_HOME=/$CONTAINER_USER/home - -# Jackson container volume configuration -JACKSON_CONFIG_CHROME=$CONTAINER_HOME/.config/google-chrome -JACKSON_CONFIG_CODE=$CONTAINER_HOME/.config/Code +JACKSON_CONFIG_CHROME=/$CONTAINER_USER/home/.config/google-chrome +JACKSON_CONFIG_CODE=/$CONTAINER_USER/home/.config/Code # Give the container user ownership of the JACKSON_CONFIG_CHROME volume docker run \