├── .travis.yml ├── Dockerfile ├── README.md ├── screenshot └── nvim.png └── zplug └── patch └── pipe_fix.diff /.travis.yml: -------------------------------------------------------------------------------- 1 | language: generic 2 | 3 | services: 4 | - docker 5 | 6 | install: 7 | - docker build -t dev . 8 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM archlinux:base-devel 2 | MAINTAINER nemanjan00 nemanjan00@gmail.com 3 | 4 | USER 0 5 | 6 | # Install dependencies for building stuff 7 | RUN pacman -Syu --noconfirm git base-devel curl 8 | 9 | # Install shell 10 | RUN pacman -Syu --noconfirm zsh 11 | 12 | # Create user 13 | RUN groupadd -g 1000 user 14 | RUN useradd -r -u 1000 -g 1000 -s /usr/bin/zsh user 15 | RUN usermod -d /work -m user 16 | 17 | # Cmake 18 | RUN pacman -Syu --noconfirm clang cmake 19 | 20 | # Prepare home for user 21 | RUN mkdir /work 22 | RUN chown 1000:1000 /work 23 | WORKDIR /work 24 | 25 | USER 1000 26 | 27 | # Install node 28 | USER 0 29 | RUN pacman -Syu --noconfirm nodejs yarn 30 | 31 | # Add some common stuff 32 | RUN pacman -Syu --noconfirm htop ripgrep fzf jq 33 | 34 | # Ctags 35 | RUN pacman -Syu --noconfirm ctags 36 | 37 | # Install neovim stuff 38 | RUN pacman -Syu --noconfirm python-pynvim neovim 39 | 40 | # Install tmux stuff 41 | RUN pacman -Syu --noconfirm tmux 42 | 43 | # Install language version manager 44 | USER 1000 45 | RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.7.6 46 | RUN echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.zshrc 47 | RUN echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.zshrc 48 | 49 | # Disable cache 50 | #ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" /tmp/skipcache 51 | 52 | # Setup zsh and plugins 53 | RUN git clone https://github.com/zplug/zplug.git ~/.zplug 54 | 55 | COPY ./zplug /tmp/zplug 56 | RUN patch ~/.zplug/base/core/add.zsh /tmp/zplug/patch/pipe_fix.diff 57 | 58 | RUN git clone https://github.com/nemanjan00/zsh.git ~/.zsh 59 | RUN echo "source ~/.zsh/index.zsh" > ~/.zshrc 60 | 61 | RUN zsh -ic "TERM=xterm-256color ZPLUG_PIPE_FIX=true zplug install" 62 | 63 | # Download my dotfiles 64 | USER 1000 65 | RUN git clone https://github.com/nemanjan00/vim.git ~/.config/nvim 66 | 67 | # Install plug manager for vim 68 | RUN curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 69 | 70 | # Install plugins inside of vim 71 | RUN nvim +PlugInstall +qall 72 | 73 | # Coc 74 | RUN ln -s ~/.config/nvim/coc ~/.config/coc 75 | RUN zsh -c "cd ~/.config/coc/extensions ; yarn" 76 | 77 | # Install .tmux 78 | RUN git clone https://github.com/gpakosz/.tmux.git ~/.tmux 79 | RUN ln -s -f .tmux/.tmux.conf ~/.tmux.conf 80 | RUN cp ~/.tmux/.tmux.conf.local ~/ 81 | 82 | # Prepare work area 83 | USER 1000 84 | WORKDIR /work 85 | 86 | CMD ["tmux"] 87 | 88 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dev-environment 2 | 3 | [![Build Status](https://travis-ci.org/nemanjan00/dev-environment.svg?branch=master)](https://travis-ci.org/nemanjan00/dev-environment) 4 | [![Docker hub](https://images.microbadger.com/badges/image/nemanjan00/dev.svg)](https://hub.docker.com/repository/docker/nemanjan00/dev) 5 | 6 | ![Screenshot](https://github.com/nemanjan00/dev-environment/blob/master/screenshot/nvim.png?raw=true) 7 | 8 | My docker-based dev environment. 9 | 10 | I am Vim person, but, my setup is not quite git clone, so, I have decided to 11 | build docker based IDE, for editing actual code on servers. 12 | 13 | ## Table of contents 14 | 15 | 16 | 17 | * [Build it](#build-it) 18 | * [Run it](#run-it) 19 | * [Opening project inside of it](#opening-project-inside-of-it) 20 | * [Components](#components) 21 | * [Supported languages](#supported-languages) 22 | * [Author](#author) 23 | 24 | 25 | 26 | ## Build it 27 | 28 | ```bash 29 | docker build -t nemanjan00/dev . 30 | ``` 31 | 32 | ## Run it 33 | 34 | ```bash 35 | docker run -ti nemanjan00/dev 36 | ``` 37 | 38 | ## Opening project inside of it 39 | 40 | ```bash 41 | docker run -ti -eTERM=xterm-256color -v$(pwd):/work/project nemanjan00/dev zsh -ic "cd project ; tmux" 42 | ``` 43 | 44 | ## Components 45 | 46 | * [vim](https://www.vim.org/) with [my config](https://github.com/nemanjan00/vim) 47 | 48 | ## Supported languages 49 | 50 | * CSS 51 | 52 | * Dockerfile 53 | 54 | * HTML (with emmet support) 55 | 56 | * JS (eslint and tsserver) 57 | 58 | * JSon 59 | 60 | * PHP 61 | 62 | * Python 63 | 64 | * Bash 65 | 66 | * SQL 67 | 68 | * VimL 69 | 70 | * XML 71 | 72 | * Yaml 73 | 74 | * Much more 75 | 76 | ## Author 77 | 78 | * [nemanjan00](https://github.com/nemanjan00) 79 | 80 | -------------------------------------------------------------------------------- /screenshot/nvim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nemanjan00/dev-environment/53e946b3790642a13bbfbfe6598bea415f666a5e/screenshot/nvim.png -------------------------------------------------------------------------------- /zplug/patch/pipe_fix.diff: -------------------------------------------------------------------------------- 1 | diff --git a/base/core/add.zsh b/base/core/add.zsh 2 | index 76adc7f..46e2846 100644 3 | --- a/base/core/add.zsh 4 | +++ b/base/core/add.zsh 5 | @@ -6,7 +6,7 @@ __zplug::core::add::to_zplugs() 6 | local -a re_tags 7 | 8 | # DEPRECATED: pipe 9 | - if [[ -p /dev/stdin ]]; then 10 | + if [[ ! $ZPLUG_PIPE_FIX="true" && -p /dev/stdin ]]; then 11 | __zplug::core::migration::pipe 12 | return $status 13 | fi 14 | --------------------------------------------------------------------------------