-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
95 lines (83 loc) · 2.19 KB
/
Dockerfile
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
FROM ubuntu:22.04
RUN yes | unminimize && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
bc \
build-essential \
clang \
clang-format \
cmake \
cpu-checker \
curl \
dc \
default-jdk \
emacs \
g++ \
gcc \
gdb \
git \
graphviz \
htop \
libffi-dev \
libgtest-dev \
libpthread-stubs0-dev \
libssl-dev \
linux-tools-common \
linux-tools-generic \
lmodern \
locales \
make \
man-db \
manpages \
manpages-dev \
nodejs \
npm \
pandoc \
python-is-python3 \
python3 \
python3-dev \
python3-pip \
qemu-system-x86 \
software-properties-common \
texlive-latex-base \
texlive-latex-recommended \
texlive-fonts-recommended \
tmux \
tree \
valgrind \
vim \
wamerican \
zip \
&& apt-get -y autoremove && apt-get -y clean \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g typescript ts-node tldr
RUN pip3 install subprocess32 gradescope-utils
ADD [".bashrc", "/root/"]
# Install vim and YouCompleteMe with clang completion
# This must be done as a non-root user. Sigh.
# Insert vim simplicity of installation rhetoric here...
RUN useradd -ms /bin/bash rameses
USER rameses
RUN mkdir -p ~/.vim/bundle
# If .vimrc is used here, not .vimrc-bootstrap, PluginInstall never ends
ADD --chown=rameses .vimrc-bootstrap /home/rameses/.vimrc
RUN git clone https://github.com/VundleVim/Vundle.vim.git /home/rameses/.vim/bundle/Vundle.vim
RUN vim -c 'PluginInstall' -c 'qa!'
RUN cd ~/.vim/bundle/YouCompleteMe/ && python3 install.py --clang-completer
USER root
RUN mv /home/rameses/.vim /root/.vim
RUN chown -R root.root /root/.vim
ADD [".vimrc", "/root/.vimrc"]
ADD [".emacs", "/root/.emacs"]
ADD ["bin/*", "/usr/local/bin"]
RUN chmod +x /usr/local/bin/*
ADD [".ycm_extra_conf.py", "/root/.ycm_extra_conf.py"]
ADD [".clang-format", "/.clang-format"]
# Fix the locale for the manual pages
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
RUN echo "LANG=en_US.UTF-8" > /etc/locale.conf
RUN locale-gen en_US.UTF-8
# Takes approximately 30 seconds when building container
# This is not cached when building locally, so if you are doing so, please comment this out
# Perhaps put Dockerfile into .git/info/exclude
RUN tldr --update
CMD ["bash"]