Files
linux_docker/Dockerfile
T
2018-04-04 11:25:55 -04:00

78 lines
1.7 KiB
Docker

FROM ubuntu:17.10
RUN apt-get update && apt-get install -y \
autoconf \
automake \
bsdmainutils \
ccache \
clang-format \
clang \
cmake \
curl \
emacs \
flex \
g++ \
gcc \
gdb \
git \
glibc-source \
htop \
iputils-ping \
libc6-dbg \
libclang-dev \
liblttng-ust-dev \
libncurses5-dev \
libreadline-dev \
libtool \
libz-dev \
llvm \
locales \
lttng-modules-dkms \
lttng-tools \
make \
net-tools \
ninja-build \
openssh-server \
pkg-config \
python-pip \
screen \
silversearcher-ag \
sudo \
tcl \
tcsh \
texinfo \
tmux \
tree \
unzip \
uuid-dev \
vim \
sqlite3 \
libsqlite3-dev
run pip install pybars3
# fix locale so we can run tmux
run sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
run locale-gen
# expand libc sources
run cd /usr/src/glibc ; tar xvf glibc-*.tar.xz
# build rtags
copy rtags.zip /externals/
run cd /externals/ && unzip rtags.zip && cd rtags && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 && make -j$(nproc) install && rm -rf /externals
# build cgdb (the version shipped with ubuntu is too old)
copy cgdb-0.7.0.tar.gz /externals/
run cd /externals/ && tar -xvzf cgdb-0.7.0.tar.gz && cd cgdb-0.7.0 && ./configure && make -j$(nproc) && make install
# setup ssh
RUN mkdir /var/run/sshd && echo 'root:root' | chpasswd && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
RUN ln -s /dev/shm/ /run/
ENV NOTVISIBLE "in users profile"