Make user easily configurable from Dockerfile

This commit is contained in:
Kristóf Tóth 2018-05-24 23:12:14 +02:00
parent bfda8fc1eb
commit 82783114fb

View File

@ -1,5 +1,7 @@
FROM debian:unstable FROM debian:unstable
USER root
RUN export DEBIAN_FRONTEND=noninteractive &&\ RUN export DEBIAN_FRONTEND=noninteractive &&\
apt-get update &&\ apt-get update &&\
apt-get install -y locales apt-get install -y locales
@ -23,16 +25,15 @@ RUN export DEBIAN_FRONTEND=noninteractive &&\
COPY . / COPY . /
RUN cd /root &&\ RUN git clone https://git.strongds.hu/mrtoth/zshrc.git ~/zshrc &&\
git clone https://git.strongds.hu/mrtoth/zshrc.git &&\ echo "${HOME}/.oh-my-zsh" > ~/zshrc/oh-my-zsh_path &&\
echo "/root/.oh-my-zsh" > zshrc/oh-my-zsh_path &&\
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" &&\ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" &&\
ln -sf /root/zshrc/rc /root/.zshrc &&\ ln -sf ~/zshrc/rc ~/.zshrc &&\
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting &&\ ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting &&\
chsh -s /bin/zsh chsh -s /bin/zsh
RUN git clone --depth 1 https://github.com/junegunn/fzf.git /root/.fzf &&\ RUN git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf &&\
/root/.fzf/install ~/.fzf/install
CMD ["/bin/zsh"] CMD ["/bin/zsh"]