blob: 962fe97de058bee4fdf2381b74cfb53bcd57df13 [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 \
Alexander Polcyn27bf05d2017-08-07 18:09:11 -070025 dnsutils \
Adele Zhou9506ef22016-03-02 13:53:34 -080026 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
Matt Kwong52ff9862017-04-17 13:56:51 -070052# 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
Adele Zhou9506ef22016-03-02 13:53:34 -080056#================
57# C# dependencies
58
59# Update to a newer version of mono
Matt Kwonga7983182017-06-02 14:02:47 -070060RUN 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
Adele Zhou9506ef22016-03-02 13:53:34 -080062RUN 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
Adele Zhou9506ef22016-03-02 13:53:34 -080064
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
Alexander Polcyn809292a2016-07-25 17:27:35 -070072RUN nuget update -self
73
Matt Kwong1c5a5f22017-09-12 17:44:37 -070074# 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
Adele Zhou9506ef22016-03-02 13:53:34 -080092#=================
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
murgatroid999fab4382016-04-29 15:05:00 -0700102# Install all versions of node that we want to test
murgatroid99a6ce1ff2017-06-27 18:15:38 -0700103RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache && npm install -g npm"
104RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache && npm install -g npm"
105RUN /bin/bash -l -c "nvm install 6 && npm config set cache /tmp/npm-cache && npm install -g npm"
106RUN /bin/bash -l -c "nvm install 8 && npm config set cache /tmp/npm-cache && npm install -g npm"
murgatroid999eb82a42018-03-09 15:45:45 -0800107RUN /bin/bash -l -c "nvm install 9 && npm config set cache /tmp/npm-cache && npm install -g npm"
108RUN /bin/bash -l -c "nvm alias default 9"
Adele Zhou9506ef22016-03-02 13:53:34 -0800109#=================
110# PHP dependencies
111
112# Install dependencies
113
Adele Zhou9506ef22016-03-02 13:53:34 -0800114RUN apt-get update && apt-get install -y \
115 git php5 php5-dev phpunit unzip
116
117#==================
118# Ruby dependencies
119
120# Install rvm
121RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
122RUN \curl -sSL https://get.rvm.io | bash -s stable
123
124# Install Ruby 2.1
125RUN /bin/bash -l -c "rvm install ruby-2.1"
126RUN /bin/bash -l -c "rvm use --default ruby-2.1"
127RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
128RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
129RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc"
130RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
131
132#====================
133# Python dependencies
134
135# Install dependencies
136
137RUN apt-get update && apt-get install -y \
138 python-all-dev \
139 python3-all-dev \
140 python-pip
141
142# Install Python packages from PyPI
Mehrdad Afsharid0d8ce82018-04-18 17:51:32 -0700143RUN pip install --upgrade pip==10.0.1
Adele Zhou9506ef22016-03-02 13:53:34 -0800144RUN pip install virtualenv
Mehrdad Afsharic1769172018-04-19 00:43:03 -0400145RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 twisted==17.5.0
Adele Zhou9506ef22016-03-02 13:53:34 -0800146
Matt Kwong0ff19572017-03-30 18:22:21 -0700147# Install coverage for Python test coverage reporting
148RUN pip install coverage
149ENV PATH ~/.local/bin:$PATH
150
Adele Zhou9506ef22016-03-02 13:53:34 -0800151# Prepare ccache
152RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
153RUN ln -s /usr/bin/ccache /usr/local/bin/g++
154RUN ln -s /usr/bin/ccache /usr/local/bin/cc
155RUN ln -s /usr/bin/ccache /usr/local/bin/c++
156RUN ln -s /usr/bin/ccache /usr/local/bin/clang
157RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
158
Adele Zhou9506ef22016-03-02 13:53:34 -0800159
160RUN mkdir /var/local/jenkins
161
162# Define the default command.
163CMD ["bash"]