Permalink
663fec1 Dec 5, 2018
1 contributor

Users who have contributed to this file

79 lines (66 sloc) 2.41 KB
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y software-properties-common curl \
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \
&& apt-get update \
&& apt-get -y install \
build-essential \
ccache \
clang-3.9 \
git git-lfs \
python-pip \
sudo \
unzip \
xz-utils
RUN python -m pip install --upgrade pip \
&& python -m pip install cmake conan>=1.10.0
# Ninja
RUN curl -L -o ninja-linux.zip https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip \
&& unzip ninja-linux.zip \
&& mv ninja /usr/local/bin/ninja \
&& rm ninja-linux.zip
ENV CC=clang-3.9
ENV CXX=clang++-3.9
# Add user jenkins to the image
RUN adduser --uid 500 --disabled-password --gecos "" jenkins \
# Add user jenkins to sudoers with NOPASSWD
&& echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
# Set password for the jenkins user (you may want to alter this).
&& echo "jenkins:jenkins" | chpasswd
USER jenkins
ENV CCACHE_DIR=/home/jenkins/cache/ccache
RUN mkdir -p $CCACHE_DIR
ENV CCACHE_MAXSIZE=15G
ENV CCACHE_SLOPPINESS=pch_defines,time_macros
ENV CONAN_USER_HOME=/home/jenkins/cache/conan
WORKDIR /home/jenkins
RUN conan user
### END clang.minimal ###
USER root
RUN apt-get update \
&& apt-get -y install apt-transport-https curl \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" \
| tee /etc/apt/sources.list.d/yarn.list \
&& curl -s https://deb.nodesource.com/setup_8.x | bash \
&& apt-get update && apt-get install -y \
biber \
clang-tidy-3.9 \
cppcheck \
doxygen \
graphviz \
libxml2-utils \
nodejs \
pandoc-citeproc \
yarn
RUN update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
# Hugo
RUN curl -L -o hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v0.32.3/hugo_0.32.3_Linux-64bit.tar.gz \
&& tar xf hugo.tar.gz \
&& mv hugo /usr/local/bin/hugo \
&& rm -rf hugo.tar.gz LICENSE.md README.md
# Include-what-you-use
RUN curl https://include-what-you-use.org/downloads/include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz -O \
&& tar xf include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz -C /usr/ --strip-components=1 \
&& rm include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz
USER jenkins