forked from mbrt/go-docker-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
64 lines (59 loc) · 3.62 KB
/
Dockerfile
File metadata and controls
64 lines (59 loc) · 3.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM golang:wheezy
MAINTAINER Michele Bertasi
LABEL uveio="public"
ADD fs/ /
# install pagkages
RUN apt-get update && \
apt-get install -y ncurses-dev libtolua-dev exuberant-ctags && \
ln -s /usr/include/lua5.2/ /usr/include/lua && \
ln -s /usr/lib/x86_64-linux-gnu/liblua5.2.so /usr/lib/liblua.so && \
cd /tmp && \
# build and install vim
git clone https://github.com/vim/vim.git && \
cd vim && \
./configure --with-features=huge --enable-luainterp \
--enable-gui=no --without-x --prefix=/usr && \
make VIMRUNTIMEDIR=/usr/share/vim/vim74 && \
make install && \
# get go tools
go get golang.org/x/tools/cmd/godoc && \
go get github.com/nsf/gocode && \
go get golang.org/x/tools/cmd/goimports && \
go get github.com/rogpeppe/godef && \
go get golang.org/x/tools/cmd/oracle && \
go get golang.org/x/tools/cmd/gorename && \
go get github.com/golang/lint/golint && \
go get github.com/kisielk/errcheck && \
go get github.com/jstemmer/gotags && \
mv /go/bin/* /usr/local/go/bin && \
# add dev user
adduser dev --disabled-password --gecos "" && \
echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers && \
chown -R dev:dev /home/dev /go && \
# cleanup
rm -rf /go/src/* /go/pkg && \
apt-get remove -y ncurses-dev && \
apt-get autoremove -y && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
USER dev
ENV HOME /home/dev
# install vim plugins
RUN mkdir -p ~/.vim/bundle && \
cd ~/.vim/bundle && \
git clone --depth 1 https://github.com/gmarik/Vundle.vim.git && \
git clone --depth 1 https://github.com/fatih/vim-go.git && \
git clone --depth 1 https://github.com/majutsushi/tagbar.git && \
git clone --depth 1 https://github.com/Shougo/neocomplete.vim.git && \
git clone --depth 1 https://github.com/scrooloose/nerdtree.git && \
git clone --depth 1 https://github.com/bling/vim-airline.git && \
git clone --depth 1 https://github.com/tpope/vim-fugitive.git && \
git clone --depth 1 https://github.com/jistr/vim-nerdtree-tabs.git && \
git clone --depth 1 https://github.com/mbbill/undotree.git && \
git clone --depth 1 https://github.com/Lokaltog/vim-easymotion.git && \
git clone --depth 1 https://github.com/scrooloose/nerdcommenter.git && \
vim +PluginInstall +qall && \
# cleanup
rm -rf Vundle.vim/.git vim-go/.git tagbar/.git neocomplete.vim/.git \
nerdtree/.git vim-airline/.git vim-fugitive/.git \
vim-nerdtree-tabs/.git undotree/.git vim-easymotion/.git \
nerdcommenter/.git