diff --git a/.gitignore b/.gitignore index eb3528e..b339eda 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ zcompdump.zwc # OS X .DS_Store **/.DS_Store + +.ssh diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..cec2f70 --- /dev/null +++ b/.zshrc @@ -0,0 +1,22 @@ +# Sample zshrc + +ZPLUG_SUDO_PASSWORD= +ZPLUG_PROTOCOL=ssh + +source $HOME/.zplug/init.zsh + +zplug "b4b4r07/ultimate", as:theme +zplug 'b4b4r07/zplug-doctor', lazy:yes +zplug 'b4b4r07/zplug-cd', lazy:yes +zplug 'b4b4r07/zplug-rm', lazy:yes + +if ! zplug check --verbose; then + printf "Install? [y/N]: " + if read -q; then + echo; zplug install + fi + echo +fi + +zplug load + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fd6dea4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM ubuntu:xenial + +RUN apt update && apt-get install -y software-properties-common && \ + add-apt-repository -y ppa:jonathonf/vim && \ + apt-get update && apt-get install -y locales build-essential openssh-server git vim zsh tmux curl unzip sudo && \ + rm -rf /var/lib/apt/lists/* + +RUN locale-gen en_US.UTF-8 + +RUN groupadd -g 1000 zplug && \ + useradd -g zplug -G sudo -m -s /bin/zsh zplug && \ + echo 'zplug:zplug' | chpasswd + +# .ssh dir needs to be copied from your home +ADD .ssh /home/zplug/.ssh + +RUN chown -R zplug:zplug /home/zplug +RUN chmod 600 /home/zplug/.ssh/id_rsa + +USER zplug +WORKDIR /home/zplug + +RUN git clone https://github.com/zplug/zplug ~/.zplug + +CMD ["/bin/zsh"] diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..2065381 --- /dev/null +++ b/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +cp -R ~/.ssh .ssh + +docker build -t zplug -f Dockerfile . + +rm -rf .ssh diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..37fedfd --- /dev/null +++ b/run.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +zshrc_path=${1:-${PWD}/.zshrc} + +docker run --rm -v $zshrc_path:/home/zplug/.zshrc -it zplug