blob: b7373b5d9c35b945bc9333e7fbb22303ed145455 [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
Adele Zhou9506ef22016-03-02 13:53:34 -080073#=================
74# C++ dependencies
75RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean
76
77#==================
78# Node dependencies
79
80# Install nvm
81RUN touch .profile
82RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
murgatroid999fab4382016-04-29 15:05:00 -070083# Install all versions of node that we want to test
murgatroid99a6ce1ff2017-06-27 18:15:38 -070084RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache && npm install -g npm"
85RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache && npm install -g npm"
86RUN /bin/bash -l -c "nvm install 6 && npm config set cache /tmp/npm-cache && npm install -g npm"
87RUN /bin/bash -l -c "nvm install 8 && npm config set cache /tmp/npm-cache && npm install -g npm"
murgatroid997ad758c2017-06-27 13:53:19 -070088RUN /bin/bash -l -c "nvm alias default 8"
Adele Zhou9506ef22016-03-02 13:53:34 -080089#=================
90# PHP dependencies
91
92# Install dependencies
93
Adele Zhou9506ef22016-03-02 13:53:34 -080094RUN apt-get update && apt-get install -y \
95 git php5 php5-dev phpunit unzip
96
97#==================
98# Ruby dependencies
99
100# Install rvm
101RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
102RUN \curl -sSL https://get.rvm.io | bash -s stable
103
104# Install Ruby 2.1
105RUN /bin/bash -l -c "rvm install ruby-2.1"
106RUN /bin/bash -l -c "rvm use --default ruby-2.1"
107RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
108RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
109RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc"
110RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
111
112#====================
113# Python dependencies
114
115# Install dependencies
116
117RUN apt-get update && apt-get install -y \
118 python-all-dev \
119 python3-all-dev \
120 python-pip
121
122# Install Python packages from PyPI
123RUN pip install pip --upgrade
124RUN pip install virtualenv
Mehrdad Afshari9b3c73d2017-03-07 22:10:15 +0000125RUN 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 -0800126
Matt Kwong0ff19572017-03-30 18:22:21 -0700127# Install coverage for Python test coverage reporting
128RUN pip install coverage
129ENV PATH ~/.local/bin:$PATH
130
Adele Zhou9506ef22016-03-02 13:53:34 -0800131# Prepare ccache
132RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
133RUN ln -s /usr/bin/ccache /usr/local/bin/g++
134RUN ln -s /usr/bin/ccache /usr/local/bin/cc
135RUN ln -s /usr/bin/ccache /usr/local/bin/c++
136RUN ln -s /usr/bin/ccache /usr/local/bin/clang
137RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
138
Adele Zhou9506ef22016-03-02 13:53:34 -0800139
140RUN mkdir /var/local/jenkins
141
142# Define the default command.
143CMD ["bash"]