From ed8fc9fd6509e027e125e9e6b78243291c781086 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Thu, 1 Feb 2018 10:18:56 -0500 Subject: [PATCH] Add link from /run/shm/ to /dev/shm --- Dockerfile | 147 +++++++++++++++++++++++++++-------------------------- 1 file changed, 74 insertions(+), 73 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6119f7e..f7d1978 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,73 +1,74 @@ -FROM ubuntu:17.10 - -RUN apt-get update && apt-get install -y \ - gcc \ - g++ \ - autoconf \ - automake \ - libtool \ - make \ - cmake \ - pkg-config \ - unzip \ - gdb \ - clang \ - llvm \ - libclang-dev \ - libncurses5-dev \ - flex \ - texinfo \ - libreadline-dev \ - sudo \ - emacs \ - vim \ - git \ - silversearcher-ag \ - tmux \ - screen \ - htop \ - libz-dev \ - tcsh \ - tree \ - tcl \ - uuid-dev \ - python-pip \ - glibc-source \ - libc6-dbg \ - locales \ - openssh-server \ - iputils-ping \ - net-tools \ - ninja-build \ - ccache \ - clang-format \ - bsdmainutils \ - lttng-tools \ - lttng-modules-dkms \ - liblttng-ust-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 -ENV NOTVISIBLE "in users profile" - +FROM ubuntu:17.10 + +RUN apt-get update && apt-get install -y \ + gcc \ + g++ \ + autoconf \ + automake \ + libtool \ + make \ + cmake \ + pkg-config \ + unzip \ + gdb \ + clang \ + llvm \ + libclang-dev \ + libncurses5-dev \ + flex \ + texinfo \ + libreadline-dev \ + sudo \ + emacs \ + vim \ + git \ + silversearcher-ag \ + tmux \ + screen \ + htop \ + libz-dev \ + tcsh \ + tree \ + tcl \ + uuid-dev \ + python-pip \ + glibc-source \ + libc6-dbg \ + locales \ + openssh-server \ + iputils-ping \ + net-tools \ + ninja-build \ + ccache \ + clang-format \ + bsdmainutils \ + lttng-tools \ + lttng-modules-dkms \ + liblttng-ust-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" +