Browse Source

利用软链接替换复制操作

master
Alvis Zhao 6 years ago
parent
commit
10b15656d1
  1. 18
      Dockerfile
  2. 7
      README.md
  3. 4
      setup.sh
  4. 1
      vim/Dockerfile

18
Dockerfile

@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
FROM alvisisme/docker-ubuntu-1604-163
LABEL maintainer="Alvis Zhao <alvisisme@163.com>"
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" ]

7
README.md

@ -25,6 +25,13 @@ @@ -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)

4
setup.sh

@ -1,7 +1,7 @@ @@ -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 @@ -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,重新进入终端后生效

1
vim/Dockerfile

@ -1,4 +1,3 @@ @@ -1,4 +1,3 @@
# docker build -t alvisisme/cpp-dev .
FROM alvisisme/docker-ubuntu-non-root-with-utils
LABEL maintainer="Alvis<alvisisme@gmail.com>"

Loading…
Cancel
Save