diff --git a/Dockerfile b/Dockerfile index 7b0fb36..b35309f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,112 +1,113 @@ -FROM ubuntu:bionic - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive 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 \ - tcpdump \ - valgrind \ - tzdata \ - npm \ - nodejs \ - 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/ - -#taken from https://hub.docker.com/r/microsoft/dotnet/~/dockerfile/ -# region .net core - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - libunwind8 \ - curl \ - && rm -rf /var/lib/apt/lists/* - -# Install .NET Core SDK -ENV DOTNET_SDK_VERSION 2.1.4 -ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz -ENV DOTNET_SDK_DOWNLOAD_SHA 05FE90457A8B77AD5A5EB2F22348F53E962012A55077AC4AD144B279F6CAD69740E57F165820BFD6104E88B30E93684BDE3E858F781541D4F110F28CD52CE2B7 - -RUN curl -SL $DOTNET_SDK_DOWNLOAD_URL --output dotnet.tar.gz \ - && echo "$DOTNET_SDK_DOWNLOAD_SHA dotnet.tar.gz" | sha512sum -c - \ - && mkdir -p /usr/share/dotnet \ - && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ - && rm dotnet.tar.gz \ - && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet - -# Trigger the population of the local package cache -ENV NUGET_XMLDOC_MODE skip -RUN mkdir warmup \ - && cd warmup \ - && dotnet new \ - && cd .. \ - && rm -rf warmup \ - && rm -rf /tmp/NuGetScratch - - +FROM ubuntu:bionic + +RUN apt-get update && DEBIAN_FRONTEND=noninteractive 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 \ + tcpdump \ + valgrind \ + tzdata \ + npm \ + nodejs \ + libsqlite3-dev + +run pip install pybars3 +run npm install -g npx + +# 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/ + +#taken from https://hub.docker.com/r/microsoft/dotnet/~/dockerfile/ +# region .net core + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + libunwind8 \ + curl \ + && rm -rf /var/lib/apt/lists/* + +# Install .NET Core SDK +ENV DOTNET_SDK_VERSION 2.1.4 +ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz +ENV DOTNET_SDK_DOWNLOAD_SHA 05FE90457A8B77AD5A5EB2F22348F53E962012A55077AC4AD144B279F6CAD69740E57F165820BFD6104E88B30E93684BDE3E858F781541D4F110F28CD52CE2B7 + +RUN curl -SL $DOTNET_SDK_DOWNLOAD_URL --output dotnet.tar.gz \ + && echo "$DOTNET_SDK_DOWNLOAD_SHA dotnet.tar.gz" | sha512sum -c - \ + && mkdir -p /usr/share/dotnet \ + && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ + && rm dotnet.tar.gz \ + && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet + +# Trigger the population of the local package cache +ENV NUGET_XMLDOC_MODE skip +RUN mkdir warmup \ + && cd warmup \ + && dotnet new \ + && cd .. \ + && rm -rf warmup \ + && rm -rf /tmp/NuGetScratch + +