跳至主要内容

博文

目前显示的是标签为“zsh”的博文

Create a docker image for coding (2)

基本思路是基于alpine来安装一些软件,包括 zsh, tmux, vim 等。 ``` FROM alpine:latest RUN echo "start to build linux workspace" \ # Install Workspace related tools && apk add --update --no-cache git curl vim tmux zsh \ # Install VIM bundle && mkdir -p ~/.vim/bundle \ && git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim ``` 接着开始配置这些工具,像是 vim 和 tmux 最好使用 GitHub 上开放的配置文件,或者如果自己有偏好设置也行。我使用的就是自己定制的一些配置文件。 ``` COPY vimrc /root/.vimrc COPY tmux.conf /root/.tmux.conf ``` zsh 的配置就没有太多的花头,大名鼎鼎的 oh-my-zsh 足矣。 ``` RUN echo "then configure tools" \ # By default the login shell for root user is /bin/ash in alpine, replace with zsh && sed -i -e "s/bin\/ash/bin\/zsh/" /etc/passwd \ # Install oh-my-zsh and configure zsh && (sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" || true) \ && sed -i -- 's/robbyrussell/w...

Create a docker image for coding (1)

玩了会儿 Alpine 发现短小精悍, > docker run -it --rm -t alpine:latest /bin/sh 于是开始基于这个image打造自己的coding environment。安装了 zsh, tmux, vim 等工具。启动一个 container 就直接进入 tmux 的界面,可以随意开多视窗或是切割视窗,丰俭由人。 参考资料: 0. [Docker run reference](https://docs.docker.com/engine/reference/run/) 0. [Dockfile](https://github.com/JAremko/alpine-vim/blob/master/alpine-vim-base/Dockerfile) 0. [Oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) 0. [Vundle for VIM](https://github.com/VundleVim/Vundle.vim) 0. [Making tmux Pretty and Usable](http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/)