1
0
Fork 0
mirror of https://github.com/zplug/zplug synced 2024-05-03 22:26:45 +02:00

Add Dockerfile for testing zplug

This commit is contained in:
b4b4r07 2018-05-14 22:42:29 +09:00
parent 3d6f272374
commit eddb073889
5 changed files with 65 additions and 0 deletions

2
.gitignore vendored
View File

@ -27,3 +27,5 @@ zcompdump.zwc
# OS X
.DS_Store
**/.DS_Store
.ssh

22
.zshrc Normal file
View File

@ -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

25
Dockerfile Normal file
View File

@ -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"]

9
build.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -e
cp -R ~/.ssh .ssh
docker build -t zplug -f Dockerfile .
rm -rf .ssh

7
run.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -e
zshrc_path=${1:-${PWD}/.zshrc}
docker run --rm -v $zshrc_path:/home/zplug/.zshrc -it zplug