Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 1 | # Copyright 2016 gRPC authors. |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 2 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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 |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 6 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 8 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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. |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 14 | |
| 15 | FROM debian:jessie |
| 16 | |
| 17 | # Install Git and basic packages. |
| 18 | RUN 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 |
| 49 | RUN apt-get update && apt-get install -y time && apt-get clean |
| 50 | |
Matt Kwong | 52ff986 | 2017-04-17 13:56:51 -0700 | [diff] [blame] | 51 | # Google Cloud platform API libraries |
| 52 | RUN apt-get update && apt-get install -y python-pip && apt-get clean |
| 53 | RUN pip install --upgrade google-api-python-client |
| 54 | |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 55 | #================ |
| 56 | # C# dependencies |
| 57 | |
| 58 | # Update to a newer version of mono |
Matt Kwong | a798318 | 2017-06-02 14:02:47 -0700 | [diff] [blame] | 59 | RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF |
| 60 | RUN echo "deb http://download.mono-project.com/repo/debian jessie main" | tee /etc/apt/sources.list.d/mono-official.list |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 61 | RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list |
| 62 | RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 63 | |
| 64 | # Install dependencies |
| 65 | RUN 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 Polcyn | 809292a | 2016-07-25 17:27:35 -0700 | [diff] [blame] | 71 | RUN nuget update -self |
| 72 | |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 73 | #================= |
| 74 | # C++ dependencies |
| 75 | RUN 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 |
| 81 | RUN touch .profile |
| 82 | RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash |
murgatroid99 | 9fab438 | 2016-04-29 15:05:00 -0700 | [diff] [blame] | 83 | # Install all versions of node that we want to test |
murgatroid99 | a6ce1ff | 2017-06-27 18:15:38 -0700 | [diff] [blame^] | 84 | RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache && npm install -g npm" |
| 85 | RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache && npm install -g npm" |
| 86 | RUN /bin/bash -l -c "nvm install 6 && npm config set cache /tmp/npm-cache && npm install -g npm" |
| 87 | RUN /bin/bash -l -c "nvm install 8 && npm config set cache /tmp/npm-cache && npm install -g npm" |
murgatroid99 | 7ad758c | 2017-06-27 13:53:19 -0700 | [diff] [blame] | 88 | RUN /bin/bash -l -c "nvm alias default 8" |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 89 | #================= |
| 90 | # PHP dependencies |
| 91 | |
| 92 | # Install dependencies |
| 93 | |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 94 | RUN apt-get update && apt-get install -y \ |
| 95 | git php5 php5-dev phpunit unzip |
| 96 | |
| 97 | #================== |
| 98 | # Ruby dependencies |
| 99 | |
| 100 | # Install rvm |
| 101 | RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 |
| 102 | RUN \curl -sSL https://get.rvm.io | bash -s stable |
| 103 | |
| 104 | # Install Ruby 2.1 |
| 105 | RUN /bin/bash -l -c "rvm install ruby-2.1" |
| 106 | RUN /bin/bash -l -c "rvm use --default ruby-2.1" |
| 107 | RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" |
| 108 | RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" |
| 109 | RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc" |
| 110 | RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" |
| 111 | |
| 112 | #==================== |
| 113 | # Python dependencies |
| 114 | |
| 115 | # Install dependencies |
| 116 | |
| 117 | RUN 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 |
| 123 | RUN pip install pip --upgrade |
| 124 | RUN pip install virtualenv |
Mehrdad Afshari | 9b3c73d | 2017-03-07 22:10:15 +0000 | [diff] [blame] | 125 | RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 126 | |
Matt Kwong | 0ff1957 | 2017-03-30 18:22:21 -0700 | [diff] [blame] | 127 | # Install coverage for Python test coverage reporting |
| 128 | RUN pip install coverage |
| 129 | ENV PATH ~/.local/bin:$PATH |
| 130 | |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 131 | # Prepare ccache |
| 132 | RUN ln -s /usr/bin/ccache /usr/local/bin/gcc |
| 133 | RUN ln -s /usr/bin/ccache /usr/local/bin/g++ |
| 134 | RUN ln -s /usr/bin/ccache /usr/local/bin/cc |
| 135 | RUN ln -s /usr/bin/ccache /usr/local/bin/c++ |
| 136 | RUN ln -s /usr/bin/ccache /usr/local/bin/clang |
| 137 | RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ |
| 138 | |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 139 | |
| 140 | RUN mkdir /var/local/jenkins |
| 141 | |
| 142 | # Define the default command. |
| 143 | CMD ["bash"] |