blob: 6f1759bceb396d75fcc57be5d9693b5e8423bf01 [file] [log] [blame]
Jan Tattermusch7897ae92017-06-07 22:57:36 +02001# Copyright 2016 gRPC authors.
Adele Zhou9506ef22016-03-02 13:53:34 -08002#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02003# 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
Adele Zhou9506ef22016-03-02 13:53:34 -08006#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02007# http://www.apache.org/licenses/LICENSE-2.0
Adele Zhou9506ef22016-03-02 13:53:34 -08008#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02009# 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.
Adele Zhou9506ef22016-03-02 13:53:34 -080014
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 gcc \
26 gcc-multilib \
27 git \
28 golang \
29 gyp \
30 lcov \
31 libc6 \
32 libc6-dbg \
33 libc6-dev \
34 libgtest-dev \
35 libtool \
36 make \
37 perl \
38 strace \
39 python-dev \
40 python-setuptools \
41 python-yaml \
42 telnet \
43 unzip \
44 wget \
45 zip && apt-get clean
46
47#================
48# Build profiling
49RUN apt-get update && apt-get install -y time && apt-get clean
50
Matt Kwong52ff9862017-04-17 13:56:51 -070051# Google Cloud platform API libraries
52RUN apt-get update && apt-get install -y python-pip && apt-get clean
53RUN pip install --upgrade google-api-python-client
54
Adele Zhou9506ef22016-03-02 13:53:34 -080055#================
56# C# dependencies
57
58# Update to a newer version of mono
Matt Kwonga7983182017-06-02 14:02:47 -070059RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
60RUN echo "deb http://download.mono-project.com/repo/debian jessie main" | tee /etc/apt/sources.list.d/mono-official.list
Adele Zhou9506ef22016-03-02 13:53:34 -080061RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list
62RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list
Adele Zhou9506ef22016-03-02 13:53:34 -080063
64# Install dependencies
65RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \
66 mono-devel \
67 ca-certificates-mono \
68 nuget \
69 && apt-get clean
70
Alexander Polcyn809292a2016-07-25 17:27:35 -070071RUN nuget update -self
72
Matt Kwong1c5a5f22017-09-12 17:44:37 -070073# Install dotnet SDK based on https://www.microsoft.com/net/core#debian
74RUN apt-get update && apt-get install -y curl libunwind8 gettext
75# dotnet-dev-1.0.0-preview2-003131
76RUN curl -sSL -o dotnet100.tar.gz https://go.microsoft.com/fwlink/?LinkID=827530
77RUN mkdir -p /opt/dotnet && tar zxf dotnet100.tar.gz -C /opt/dotnet
78# dotnet-dev-1.0.1
79RUN curl -sSL -o dotnet101.tar.gz https://go.microsoft.com/fwlink/?LinkID=843453
80RUN mkdir -p /opt/dotnet && tar zxf dotnet101.tar.gz -C /opt/dotnet
81RUN ln -s /opt/dotnet/dotnet /usr/local/bin
82
83# Trigger the population of the local package cache
84ENV NUGET_XMLDOC_MODE skip
85RUN mkdir warmup \
86 && cd warmup \
87 && dotnet new \
88 && cd .. \
89 && rm -rf warmup
90
Adele Zhou9506ef22016-03-02 13:53:34 -080091#=================
92# C++ dependencies
93RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean
94
95#==================
96# Node dependencies
97
98# Install nvm
99RUN touch .profile
100RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
murgatroid999fab4382016-04-29 15:05:00 -0700101# Install all versions of node that we want to test
murgatroid99a6ce1ff2017-06-27 18:15:38 -0700102RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache && npm install -g npm"
103RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache && npm install -g npm"
104RUN /bin/bash -l -c "nvm install 6 && npm config set cache /tmp/npm-cache && npm install -g npm"
105RUN /bin/bash -l -c "nvm install 8 && npm config set cache /tmp/npm-cache && npm install -g npm"
murgatroid997ad758c2017-06-27 13:53:19 -0700106RUN /bin/bash -l -c "nvm alias default 8"
Adele Zhou9506ef22016-03-02 13:53:34 -0800107#=================
108# PHP dependencies
109
110# Install dependencies
111
Adele Zhou9506ef22016-03-02 13:53:34 -0800112RUN apt-get update && apt-get install -y \
113 git php5 php5-dev phpunit unzip
114
115#==================
116# Ruby dependencies
117
118# Install rvm
119RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
120RUN \curl -sSL https://get.rvm.io | bash -s stable
121
122# Install Ruby 2.1
123RUN /bin/bash -l -c "rvm install ruby-2.1"
124RUN /bin/bash -l -c "rvm use --default ruby-2.1"
125RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
126RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
127RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc"
128RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
129
130#====================
131# Python dependencies
132
133# Install dependencies
134
135RUN apt-get update && apt-get install -y \
136 python-all-dev \
137 python3-all-dev \
138 python-pip
139
140# Install Python packages from PyPI
141RUN pip install pip --upgrade
142RUN pip install virtualenv
Mehrdad Afshari9b3c73d2017-03-07 22:10:15 +0000143RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
Adele Zhou9506ef22016-03-02 13:53:34 -0800144
Matt Kwong0ff19572017-03-30 18:22:21 -0700145# Install coverage for Python test coverage reporting
146RUN pip install coverage
147ENV PATH ~/.local/bin:$PATH
148
Adele Zhou9506ef22016-03-02 13:53:34 -0800149# Prepare ccache
150RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
151RUN ln -s /usr/bin/ccache /usr/local/bin/g++
152RUN ln -s /usr/bin/ccache /usr/local/bin/cc
153RUN ln -s /usr/bin/ccache /usr/local/bin/c++
154RUN ln -s /usr/bin/ccache /usr/local/bin/clang
155RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
156
Adele Zhou9506ef22016-03-02 13:53:34 -0800157
158RUN mkdir /var/local/jenkins
159
160# Define the default command.
161CMD ["bash"]