From 10b15656d1dec88fa7762d5203db672d5c16ec1a Mon Sep 17 00:00:00 2001 From: zlzhao Date: Thu, 21 Mar 2019 00:05:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A9=E7=94=A8=E8=BD=AF=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E5=A4=8D=E5=88=B6=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 18 +++++++++--------- README.md | 7 +++++++ setup.sh | 4 ++-- vim/Dockerfile | 1 - 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 970fd44..16a765f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,14 @@ FROM alvisisme/docker-ubuntu-1604-163 + LABEL maintainer="Alvis Zhao " + RUN apt-get update && \ - apt-get install -y git vim zsh tmux && \ - chsh -s $(which zsh) - -COPY zsh /root/.oh-my-zsh -COPY zsh/templates/zshrc.zsh-template /root/.zshrc -COPY tmux/.tmux.conf /root/.tmux.conf -COPY tmux/.tmux.conf.local /root/.tmux.conf.local -COPY vim /root/.vim_runtime -RUN sh /root/.vim_runtime/install_basic_vimrc.sh + apt-get install -y vim zsh tmux + +COPY zsh /root/.oh-my-terminal/zsh +COPY tmux /root/.oh-my-terminal/tmux +COPY vim /root/.oh-my-terminal/vim +COPY setup.sh /root/.oh-my-terminal/setup.sh +RUN sh /root/.oh-my-terminal/setup.sh ENTRYPOINT [ "/bin/zsh" ] \ No newline at end of file diff --git a/README.md b/README.md index 2db9224..96d3ec8 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,13 @@ sh ~/.oh-my-terminal/setup.sh ``` +## 效果预览 + +```bash +docker build -t oh-my-terminal . +docker run -it oh-my-terminal +``` + ## 参考引用 * [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) diff --git a/setup.sh b/setup.sh index e4ee33b..bf4ee73 100644 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash # zsh -cp -r ~/.oh-my-terminal/zsh ~/.oh-my-zsh +ln -s -f ~/.oh-my-terminal/zsh ~/.oh-my-zsh cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc # tmux @@ -9,7 +9,7 @@ ln -s -f ~/.oh-my-terminal/tmux/.tmux.conf ~/.tmux.conf ln -s -f ~/.oh-my-terminal/tmux/.tmux.conf.local ~/.tmux.conf.local # vim -cp -r ~/.oh-my-terminal/vim ~/.vim_runtime +ln -s -f ~/.oh-my-terminal/vim ~/.vim_runtime sh ~/.vim_runtime/install_basic_vimrc.sh # 切换当前用户默认shell,重新进入终端后生效 diff --git a/vim/Dockerfile b/vim/Dockerfile index 298e65f..11b4af6 100644 --- a/vim/Dockerfile +++ b/vim/Dockerfile @@ -1,4 +1,3 @@ -# docker build -t alvisisme/cpp-dev . FROM alvisisme/docker-ubuntu-non-root-with-utils LABEL maintainer="Alvis"