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 \ |
Alexander Polcyn | 27bf05d | 2017-08-07 18:09:11 -0700 | [diff] [blame] | 25 | dnsutils \ |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 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 |
| 50 | RUN apt-get update && apt-get install -y time && apt-get clean |
| 51 | |
Matt Kwong | 52ff986 | 2017-04-17 13:56:51 -0700 | [diff] [blame] | 52 | # Google Cloud platform API libraries |
| 53 | RUN apt-get update && apt-get install -y python-pip && apt-get clean |
| 54 | RUN pip install --upgrade google-api-python-client |
| 55 | |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 56 | #================ |
| 57 | # C# dependencies |
| 58 | |
| 59 | # Update to a newer version of mono |
Matt Kwong | a798318 | 2017-06-02 14:02:47 -0700 | [diff] [blame] | 60 | RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF |
| 61 | 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] | 62 | RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list |
| 63 | 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] | 64 | |
| 65 | # Install dependencies |
| 66 | RUN 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 Polcyn | 809292a | 2016-07-25 17:27:35 -0700 | [diff] [blame] | 72 | RUN nuget update -self |
| 73 | |
Matt Kwong | 1c5a5f2 | 2017-09-12 17:44:37 -0700 | [diff] [blame] | 74 | # Install dotnet SDK based on https://www.microsoft.com/net/core#debian |
| 75 | RUN apt-get update && apt-get install -y curl libunwind8 gettext |
| 76 | # dotnet-dev-1.0.0-preview2-003131 |
| 77 | RUN curl -sSL -o dotnet100.tar.gz https://go.microsoft.com/fwlink/?LinkID=827530 |
| 78 | RUN mkdir -p /opt/dotnet && tar zxf dotnet100.tar.gz -C /opt/dotnet |
| 79 | # dotnet-dev-1.0.1 |
| 80 | RUN curl -sSL -o dotnet101.tar.gz https://go.microsoft.com/fwlink/?LinkID=843453 |
| 81 | RUN mkdir -p /opt/dotnet && tar zxf dotnet101.tar.gz -C /opt/dotnet |
| 82 | RUN ln -s /opt/dotnet/dotnet /usr/local/bin |
| 83 | |
| 84 | # Trigger the population of the local package cache |
| 85 | ENV NUGET_XMLDOC_MODE skip |
| 86 | RUN mkdir warmup \ |
| 87 | && cd warmup \ |
| 88 | && dotnet new \ |
| 89 | && cd .. \ |
| 90 | && rm -rf warmup |
| 91 | |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 92 | #================= |
| 93 | # C++ dependencies |
| 94 | RUN 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 |
| 100 | RUN touch .profile |
| 101 | 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] | 102 | # Install all versions of node that we want to test |
murgatroid99 | a6ce1ff | 2017-06-27 18:15:38 -0700 | [diff] [blame] | 103 | RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache && npm install -g npm" |
| 104 | RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache && npm install -g npm" |
| 105 | RUN /bin/bash -l -c "nvm install 6 && npm config set cache /tmp/npm-cache && npm install -g npm" |
| 106 | RUN /bin/bash -l -c "nvm install 8 && npm config set cache /tmp/npm-cache && npm install -g npm" |
murgatroid99 | 9eb82a4 | 2018-03-09 15:45:45 -0800 | [diff] [blame^] | 107 | RUN /bin/bash -l -c "nvm install 9 && npm config set cache /tmp/npm-cache && npm install -g npm" |
| 108 | RUN /bin/bash -l -c "nvm alias default 9" |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 109 | #================= |
| 110 | # PHP dependencies |
| 111 | |
| 112 | # Install dependencies |
| 113 | |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 114 | RUN apt-get update && apt-get install -y \ |
| 115 | git php5 php5-dev phpunit unzip |
| 116 | |
| 117 | #================== |
| 118 | # Ruby dependencies |
| 119 | |
| 120 | # Install rvm |
| 121 | RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 |
| 122 | RUN \curl -sSL https://get.rvm.io | bash -s stable |
| 123 | |
| 124 | # Install Ruby 2.1 |
| 125 | RUN /bin/bash -l -c "rvm install ruby-2.1" |
| 126 | RUN /bin/bash -l -c "rvm use --default ruby-2.1" |
| 127 | RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" |
| 128 | RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" |
| 129 | RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc" |
| 130 | RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" |
| 131 | |
| 132 | #==================== |
| 133 | # Python dependencies |
| 134 | |
| 135 | # Install dependencies |
| 136 | |
| 137 | RUN 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 |
Nathaniel Manista | 8bba3bf | 2017-06-26 16:33:25 +0000 | [diff] [blame] | 143 | RUN pip install --upgrade pip==9.0.1 |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 144 | RUN pip install virtualenv |
Mehrdad Afshari | 0df9c8a | 2017-11-24 21:20:14 -0800 | [diff] [blame] | 145 | RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.0.post1 six==1.10.0 twisted==17.5.0 |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 146 | |
Matt Kwong | 0ff1957 | 2017-03-30 18:22:21 -0700 | [diff] [blame] | 147 | # Install coverage for Python test coverage reporting |
| 148 | RUN pip install coverage |
| 149 | ENV PATH ~/.local/bin:$PATH |
| 150 | |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 151 | # Prepare ccache |
| 152 | RUN ln -s /usr/bin/ccache /usr/local/bin/gcc |
| 153 | RUN ln -s /usr/bin/ccache /usr/local/bin/g++ |
| 154 | RUN ln -s /usr/bin/ccache /usr/local/bin/cc |
| 155 | RUN ln -s /usr/bin/ccache /usr/local/bin/c++ |
| 156 | RUN ln -s /usr/bin/ccache /usr/local/bin/clang |
| 157 | RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ |
| 158 | |
Adele Zhou | 9506ef2 | 2016-03-02 13:53:34 -0800 | [diff] [blame] | 159 | |
| 160 | RUN mkdir /var/local/jenkins |
| 161 | |
| 162 | # Define the default command. |
| 163 | CMD ["bash"] |