This commit is contained in:
Jackson Delahunt 2019-07-15 12:27:27 +10:00
parent 27adfa1a3b
commit 7daa77f7c6
3 changed files with 28 additions and 16 deletions

View file

@ -272,24 +272,28 @@ RUN chown -R $USER:$USER $HOME /opt
USER $USER
WORKDIR $HOME
# If the DOTFILES_CACHEBUST build arg is supplied, rebuild from dotfiles onwards
ARG DOTFILES_CACHEBUST
RUN DOTFILES_CACHEBUST=$DOTFILES_CACHEBUST echo "Building from dotfiles..."
# Clone dotfiles configuration
RUN vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-alacritty.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-alpine.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-code.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-git.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-mime.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-musikcube.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-polo.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-rofi.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-rpi.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-scripts.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-ssh.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-sxhkd.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-tmux.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-weechat.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-x11.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-xdg.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-zsh.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-alpine.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-code.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-git.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-mime.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-musikcube.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-polo.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-rofi.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-rpi.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-scripts.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-ssh.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-sxhkd.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-tmux.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-weechat.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-x11.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-xdg.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-zsh.git & \
wait
# Cache zsh plugins

View file

@ -0,0 +1,7 @@
REPO_ROOT=$(dirname $(readlink -f $0))/../..
# Export desktop environment shell configuration
eval "$($REPO_ROOT/docker/scripts/environment.sh)"
# Rebuild the desktop environment from dotfiles onwards
DOTFILES_CACHEBUST=$(date) $REPO_ROOT/docker/scripts/build.sh

View file

@ -6,6 +6,7 @@ eval "$($REPO_ROOT/docker/scripts/environment.sh)"
docker build \
--build-arg DESKTOP_CONTAINER_BUILD_DATE=$(date +%s) \
--build-arg DESKTOP_CONTAINER_GIT_SHA=$(git --git-dir $REPO_ROOT/.git rev-parse HEAD | cut -b 1-7) \
--build-arg DOTFILES_CACHEBUST \
--file $REPO_ROOT/docker/Dockerfile \
--tag $DESKTOP_ENVIRONMENT_REGISTRY/$DESKTOP_ENVIRONMENT_CONTAINER_NAME:$DESKTOP_ENVIRONMENT_CONTAINER_TAG \
--tag $DESKTOP_ENVIRONMENT_REGISTRY/$DESKTOP_ENVIRONMENT_CONTAINER_NAME:latest \