Skip to content
Snippets Groups Projects
Dockerfile.gcc.full 2.5 KiB
Newer Older
  • Learn to ignore specific revisions
  • 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 \
        ccache \
    
    Lars Bilke's avatar
    Lars Bilke committed
        g++-6 \
    
        git git-lfs \
    
        python3-pip \
    
        sudo \
        unzip
    
    
    Lars Bilke's avatar
    Lars Bilke committed
    ENV CC=gcc-6
    ENV CXX=g++-6
    
    RUN python3 -m pip install --upgrade pip \
      && python3 -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
    
     # 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
    WORKDIR /home/jenkins
    RUN conan user
    
    ### END gcc.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 \
    
        doxygen \
        graphviz \
        libxml2-utils \
        nodejs \
        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.36.1/hugo_0.36.1_Linux-64bit.tar.gz \
    
      && tar xf hugo.tar.gz \
      && mv hugo /usr/local/bin/hugo \
      && rm -rf hugo.tar.gz LICENSE.md README.md
    
    
    # Pandoc
    RUN curl -L -o pandoc.deb https://github.com/jgm/pandoc/releases/download/2.1.1/pandoc-2.1.1-1-amd64.deb \
      && sudo dpkg -i pandoc.deb \
      && rm pandoc.deb
    
    
    # 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
    
    
    RUN apt-get install -y mesa-common-dev wget
    
    USER jenkins