1# Copyright 2016 gRPC authors. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15FROM debian:jessie 16 17# Install Git and basic packages. 18RUN apt-get update && apt-get install -y \ 19 autoconf \ 20 autotools-dev \ 21 build-essential \ 22 bzip2 \ 23 ccache \ 24 curl \ 25 dnsutils \ 26 gcc \ 27 gcc-multilib \ 28 git \ 29 golang \ 30 gyp \ 31 lcov \ 32 libc6 \ 33 libc6-dbg \ 34 libc6-dev \ 35 libgtest-dev \ 36 libtool \ 37 make \ 38 perl \ 39 strace \ 40 python-dev \ 41 python-setuptools \ 42 python-yaml \ 43 telnet \ 44 unzip \ 45 wget \ 46 zip && apt-get clean 47 48#================ 49# Build profiling 50RUN apt-get update && apt-get install -y time && apt-get clean 51 52# Google Cloud platform API libraries 53RUN apt-get update && apt-get install -y python-pip && apt-get clean 54RUN pip install --upgrade google-api-python-client 55 56#================ 57# C# dependencies 58 59# Update to a newer version of mono 60RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF 61RUN echo "deb http://download.mono-project.com/repo/debian jessie main" | tee /etc/apt/sources.list.d/mono-official.list 62RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list 63RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list 64 65# Install dependencies 66RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \ 67 mono-devel \ 68 ca-certificates-mono \ 69 nuget \ 70 && apt-get clean 71 72RUN nuget update -self 73 74# Install dotnet SDK based on https://www.microsoft.com/net/core#debian 75RUN apt-get update && apt-get install -y curl libunwind8 gettext 76# dotnet-dev-1.0.0-preview2-003131 77RUN curl -sSL -o dotnet100.tar.gz https://go.microsoft.com/fwlink/?LinkID=827530 78RUN mkdir -p /opt/dotnet && tar zxf dotnet100.tar.gz -C /opt/dotnet 79# dotnet-dev-1.0.1 80RUN curl -sSL -o dotnet101.tar.gz https://go.microsoft.com/fwlink/?LinkID=843453 81RUN mkdir -p /opt/dotnet && tar zxf dotnet101.tar.gz -C /opt/dotnet 82RUN ln -s /opt/dotnet/dotnet /usr/local/bin 83 84# Trigger the population of the local package cache 85ENV NUGET_XMLDOC_MODE skip 86RUN mkdir warmup \ 87 && cd warmup \ 88 && dotnet new \ 89 && cd .. \ 90 && rm -rf warmup 91 92#================= 93# C++ dependencies 94RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean 95 96#================== 97# Node dependencies 98 99# Install nvm 100RUN touch .profile 101RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash 102# Install all versions of node that we want to test 103RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache" 104RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache" 105RUN /bin/bash -l -c "nvm install 6 && npm config set cache /tmp/npm-cache" 106RUN /bin/bash -l -c "nvm install 8 && npm config set cache /tmp/npm-cache" 107RUN /bin/bash -l -c "nvm install 9 && npm config set cache /tmp/npm-cache" 108RUN /bin/bash -l -c "nvm install 10 && npm config set cache /tmp/npm-cache" 109RUN /bin/bash -l -c "nvm alias default 10" 110#================= 111# PHP dependencies 112 113# Install dependencies 114 115RUN apt-get update && apt-get install -y \ 116 git php5 php5-dev phpunit unzip 117 118#================== 119# Ruby dependencies 120 121# Install rvm 122RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 123RUN \curl -sSL https://get.rvm.io | bash -s stable 124 125# Install Ruby 2.1 126RUN /bin/bash -l -c "rvm install ruby-2.1" 127RUN /bin/bash -l -c "rvm use --default ruby-2.1" 128RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" 129RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" 130RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc" 131RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" 132 133#==================== 134# Python dependencies 135 136# Install dependencies 137 138RUN apt-get update && apt-get install -y \ 139 python-all-dev \ 140 python3-all-dev \ 141 python-pip 142 143# Install Python packages from PyPI 144RUN pip install --upgrade pip==10.0.1 145RUN pip install virtualenv 146RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 twisted==17.5.0 147 148# Install pip and virtualenv for Python 3.4 149RUN curl https://bootstrap.pypa.io/get-pip.py | python3.4 150RUN python3.4 -m pip install virtualenv 151 152# Install coverage for Python test coverage reporting 153RUN pip install coverage 154ENV PATH ~/.local/bin:$PATH 155 156# Install Mako to generate files in grpc/grpc-node 157RUN pip install Mako 158 159 160RUN mkdir /var/local/jenkins 161 162# Define the default command. 163CMD ["bash"] 164