James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 1 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 2 | # you may not use this file except in compliance with the License. |
| 3 | # You may obtain a copy of the License at |
| 4 | # |
| 5 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | # |
| 7 | # Unless required by applicable law or agreed to in writing, software |
| 8 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 9 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 10 | # See the License for the specific language governing permissions and |
| 11 | # limitations under the License. |
| 12 | |
| 13 | # |
| 14 | # Apache Thrift Docker build environment for Ubuntu Bionic |
James E. King III | 93ff9b0 | 2019-06-21 17:50:34 -0400 | [diff] [blame] | 15 | # with some updated packages. |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 16 | # |
| 17 | |
| 18 | FROM buildpack-deps:bionic-scm |
| 19 | MAINTAINER Apache Thrift <dev@thrift.apache.org> |
| 20 | ENV DEBIAN_FRONTEND noninteractive |
| 21 | |
| 22 | ### Add apt repos |
| 23 | |
| 24 | RUN apt-get update && \ |
| 25 | apt-get dist-upgrade -y && \ |
| 26 | apt-get install -y --no-install-recommends \ |
| 27 | apt \ |
| 28 | apt-transport-https \ |
| 29 | apt-utils \ |
| 30 | curl \ |
| 31 | dirmngr \ |
| 32 | software-properties-common \ |
| 33 | wget |
| 34 | |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 35 | # Dart |
| 36 | RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ |
| 37 | curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > \ |
| 38 | /etc/apt/sources.list.d/dart_stable.list |
| 39 | |
| 40 | # dotnet (netcore) |
| 41 | RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \ |
| 42 | wget -q -O /etc/apt/sources.list.d/microsoft-prod.list https://packages.microsoft.com/config/ubuntu/18.04/prod.list && \ |
| 43 | chown root:root /etc/apt/trusted.gpg.d/microsoft.gpg && \ |
| 44 | chown root:root /etc/apt/sources.list.d/microsoft-prod.list |
| 45 | |
James E. King III | 93ff9b0 | 2019-06-21 17:50:34 -0400 | [diff] [blame] | 46 | # erlang |
| 47 | RUN wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | apt-key add - && \ |
| 48 | echo "deb https://packages.erlang-solutions.com/ubuntu bionic contrib" | tee /etc/apt/sources.list.d/erlang.list |
| 49 | |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 50 | # node.js |
| 51 | RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ |
James E. King III | 93ff9b0 | 2019-06-21 17:50:34 -0400 | [diff] [blame] | 52 | echo "deb https://deb.nodesource.com/node_10.x bionic main" | tee /etc/apt/sources.list.d/nodesource.list |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 53 | |
| 54 | ### install general dependencies |
| 55 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 56 | `# General dependencies` \ |
| 57 | bash-completion \ |
| 58 | bison \ |
| 59 | build-essential \ |
| 60 | clang \ |
| 61 | cmake \ |
| 62 | debhelper \ |
| 63 | flex \ |
| 64 | gdb \ |
Fokko Driesprong | 1686c87 | 2019-02-01 20:31:58 +0100 | [diff] [blame] | 65 | libasound2 \ |
| 66 | libatk-bridge2.0-0 \ |
| 67 | libgtk-3-0 \ |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 68 | llvm \ |
| 69 | ninja-build \ |
| 70 | pkg-config \ |
James E. King III | b1d63e7 | 2019-01-22 14:16:39 -0500 | [diff] [blame] | 71 | unzip \ |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 72 | valgrind \ |
| 73 | vim |
| 74 | ENV PATH /usr/lib/llvm-6.0/bin:$PATH |
| 75 | |
James E. King III | b1d63e7 | 2019-01-22 14:16:39 -0500 | [diff] [blame] | 76 | # lib/as3 (ActionScript) |
| 77 | RUN mkdir -p /usr/local/adobe/flex/4.6 && \ |
| 78 | cd /usr/local/adobe/flex/4.6 && \ |
| 79 | wget -q "http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip" && \ |
| 80 | unzip flex_sdk_4.6.zip |
| 81 | ENV FLEX_HOME /usr/local/adobe/flex/4.6 |
| 82 | |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 83 | RUN apt-get install -y --no-install-recommends \ |
| 84 | `# C++ dependencies` \ |
| 85 | libboost-all-dev \ |
| 86 | libevent-dev \ |
| 87 | libssl-dev \ |
| 88 | qt5-default \ |
| 89 | qtbase5-dev \ |
| 90 | qtbase5-dev-tools |
| 91 | |
James E. King III | 93ff9b0 | 2019-06-21 17:50:34 -0400 | [diff] [blame] | 92 | ENV SBCL_VERSION 1.5.3 |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 93 | RUN \ |
| 94 | `# Common Lisp (sbcl) dependencies` \ |
| 95 | curl --version && \ |
James E. King III | abf3aa5 | 2019-01-04 17:21:02 -0500 | [diff] [blame] | 96 | curl -o sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 -J -L https://sourceforge.net/projects/sbcl/files/sbcl/${SBCL_VERSION}/sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2/download?use_mirror=managedway# && \ |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 97 | tar xjf sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 && \ |
| 98 | cd sbcl-${SBCL_VERSION}-x86-64-linux && \ |
| 99 | ./install.sh && \ |
| 100 | sbcl --version && \ |
| 101 | cd .. && \ |
| 102 | rm -rf sbcl* |
| 103 | |
James E. King III | 93ff9b0 | 2019-06-21 17:50:34 -0400 | [diff] [blame] | 104 | ENV D_VERSION 2.087.0 |
| 105 | ENV DMD_DEB dmd_2.087.0-0_amd64.deb |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 106 | RUN \ |
| 107 | `# D dependencies` \ |
| 108 | wget -q http://downloads.dlang.org/releases/2.x/${D_VERSION}/${DMD_DEB} && \ |
| 109 | dpkg --install ${DMD_DEB} && \ |
| 110 | rm -f ${DMD_DEB} && \ |
| 111 | mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ |
James E. King III | abf3aa5 | 2019-01-04 17:21:02 -0500 | [diff] [blame] | 112 | git clone -b 'v2.0.2+2.0.16' https://github.com/D-Programming-Deimos/libevent.git deimos-libevent-2.0 && \ |
| 113 | mv deimos-libevent-2.0/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ |
| 114 | mv deimos-libevent-2.0/C/* /usr/include/dmd/druntime/import/C/ && \ |
| 115 | rm -rf deimos-libevent-2.0 && \ |
James E. King III | 75bac10 | 2018-12-30 16:20:12 -0500 | [diff] [blame] | 116 | git clone -b 'v2.0.0+1.1.0h' https://github.com/D-Programming-Deimos/openssl.git deimos-openssl-1.1.0h && \ |
| 117 | mv deimos-openssl-1.1.0h/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ |
| 118 | mv deimos-openssl-1.1.0h/C/* /usr/include/dmd/druntime/import/C/ && \ |
| 119 | rm -rf deimos-openssl-1.1.0h |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 120 | |
James E. King III | 93ff9b0 | 2019-06-21 17:50:34 -0400 | [diff] [blame] | 121 | ENV DART_VERSION 2.4.0-1 |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 122 | RUN apt-get install -y --no-install-recommends \ |
| 123 | `# Dart dependencies` \ |
Brian Forbis | c64389a | 2018-09-22 07:36:24 -0400 | [diff] [blame] | 124 | dart=$DART_VERSION |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 125 | ENV PATH /usr/lib/dart/bin:$PATH |
| 126 | |
| 127 | RUN apt-get install -y --no-install-recommends \ |
| 128 | `# dotnet core dependencies` \ |
Jens Geyer | ffb97e1 | 2019-12-06 23:43:08 +0100 | [diff] [blame] | 129 | dotnet-sdk-3.1 |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 130 | |
| 131 | RUN apt-get install -y --no-install-recommends \ |
| 132 | `# Erlang dependencies` \ |
James E. King III | 93ff9b0 | 2019-06-21 17:50:34 -0400 | [diff] [blame] | 133 | erlang && \ |
| 134 | wget https://s3.amazonaws.com/rebar3/rebar3 -O /usr/bin/rebar3 && \ |
| 135 | chmod 755 /usr/bin/rebar3 && \ |
| 136 | rebar3 --version |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 137 | |
| 138 | RUN apt-get install -y --no-install-recommends \ |
| 139 | `# GlibC dependencies` \ |
| 140 | libglib2.0-dev |
| 141 | |
| 142 | # golang |
D. Can Celasun | a0c5f32 | 2019-10-09 11:41:47 +0100 | [diff] [blame] | 143 | ENV GOLANG_VERSION 1.13.1 |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 144 | ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz |
D. Can Celasun | a0c5f32 | 2019-10-09 11:41:47 +0100 | [diff] [blame] | 145 | ENV GOLANG_DOWNLOAD_SHA256 94f874037b82ea5353f4061e543681a0e79657f787437974214629af8407d124 |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 146 | RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz && \ |
| 147 | echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - && \ |
| 148 | tar -C /usr/local -xzf golang.tar.gz && \ |
| 149 | ln -s /usr/local/go/bin/go /usr/local/bin && \ |
| 150 | rm golang.tar.gz |
| 151 | |
| 152 | RUN apt-get install -y --no-install-recommends \ |
| 153 | `# Haskell dependencies` \ |
| 154 | ghc \ |
| 155 | cabal-install |
| 156 | |
| 157 | RUN apt-get install -y --no-install-recommends \ |
| 158 | `# Haxe dependencies` \ |
| 159 | haxe \ |
| 160 | neko \ |
| 161 | neko-dev && \ |
| 162 | haxelib setup --always /usr/share/haxe/lib && \ |
| 163 | haxelib install --always hxcpp 2>&1 > /dev/null |
| 164 | |
| 165 | RUN apt-get install -y --no-install-recommends \ |
| 166 | `# Java dependencies` \ |
| 167 | ant \ |
| 168 | ant-optional \ |
Fokko Driesprong | 1686c87 | 2019-02-01 20:31:58 +0100 | [diff] [blame] | 169 | maven \ |
| 170 | openjdk-11-jdk-headless |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 171 | |
| 172 | RUN apt-get install -y --no-install-recommends \ |
| 173 | `# Lua dependencies` \ |
| 174 | lua5.2 \ |
| 175 | lua5.2-dev |
| 176 | # https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212 |
| 177 | # lua5.3 does not install alternatives! |
| 178 | # need to update our luasocket code, lua doesn't have luaL_openlib any more |
| 179 | |
| 180 | RUN apt-get install -y --no-install-recommends \ |
| 181 | `# Node.js dependencies` \ |
| 182 | nodejs |
| 183 | |
Brian Forbis | b5d6ea3 | 2018-08-25 23:39:29 -0400 | [diff] [blame] | 184 | # Test dependencies for running puppeteer |
| 185 | RUN apt-get install -y --no-install-recommends \ |
| 186 | `# JS dependencies` \ |
| 187 | libxss1 |
| 188 | |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 189 | RUN apt-get install -y --no-install-recommends \ |
| 190 | `# OCaml dependencies` \ |
| 191 | ocaml \ |
| 192 | opam && \ |
| 193 | opam init --yes && \ |
| 194 | opam install --yes oasis |
| 195 | |
| 196 | RUN apt-get install -y --no-install-recommends \ |
| 197 | `# Perl dependencies` \ |
| 198 | libbit-vector-perl \ |
| 199 | libclass-accessor-class-perl \ |
| 200 | libcrypt-ssleay-perl \ |
| 201 | libio-socket-ssl-perl \ |
Kengo Seki | cb4c31a | 2019-12-26 14:34:57 +0900 | [diff] [blame] | 202 | libnet-ssleay-perl \ |
| 203 | libtest-exception-perl |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 204 | |
| 205 | RUN apt-get install -y --no-install-recommends \ |
| 206 | `# Php dependencies` \ |
| 207 | php \ |
| 208 | php-cli \ |
| 209 | php-dev \ |
James E. King III | e53d23c | 2019-02-10 11:13:23 -0500 | [diff] [blame] | 210 | php-json \ |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 211 | php-pear \ |
| 212 | re2c \ |
| 213 | composer |
| 214 | |
| 215 | RUN apt-get install -y --no-install-recommends \ |
| 216 | `# Python dependencies` \ |
| 217 | python-all \ |
| 218 | python-all-dbg \ |
| 219 | python-all-dev \ |
| 220 | python-ipaddress \ |
| 221 | python-pip \ |
| 222 | python-setuptools \ |
| 223 | python-six \ |
| 224 | python-tornado \ |
| 225 | python-twisted \ |
| 226 | python-wheel \ |
| 227 | python-zope.interface && \ |
| 228 | pip install --upgrade backports.ssl_match_hostname |
| 229 | |
| 230 | RUN apt-get install -y --no-install-recommends \ |
| 231 | `# Python3 dependencies` \ |
| 232 | python3-all \ |
| 233 | python3-all-dbg \ |
| 234 | python3-all-dev \ |
| 235 | python3-pip \ |
| 236 | python3-setuptools \ |
| 237 | python3-six \ |
| 238 | python3-tornado \ |
| 239 | python3-twisted \ |
| 240 | python3-wheel \ |
| 241 | python3-zope.interface |
| 242 | |
| 243 | RUN apt-get install -y --no-install-recommends \ |
| 244 | `# Ruby dependencies` \ |
| 245 | ruby \ |
| 246 | ruby-dev \ |
| 247 | ruby-bundler |
| 248 | |
Danny Browning | 181d900 | 2019-04-15 09:50:24 -0600 | [diff] [blame] | 249 | # Rust dependencies |
Jano Svitok | 2e11577 | 2020-03-06 09:01:43 +0100 | [diff] [blame] | 250 | RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.36.0 -y |
James E. King III | 93ff9b0 | 2019-06-21 17:50:34 -0400 | [diff] [blame] | 251 | ENV PATH /root/.cargo/bin:$PATH |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 252 | |
James E. King III | a3a7c6c | 2018-12-31 17:17:34 -0500 | [diff] [blame] | 253 | # Swift on Linux for cross tests |
| 254 | RUN cd / && \ |
Jano Svitok | 2e11577 | 2020-03-06 09:01:43 +0100 | [diff] [blame] | 255 | wget --quiet https://swift.org/builds/swift-5.1.4-release/ubuntu1804/swift-5.1.4-RELEASE/swift-5.1.4-RELEASE-ubuntu18.04.tar.gz && \ |
| 256 | tar xf swift-5.1.4-RELEASE-ubuntu18.04.tar.gz --strip-components=1 && \ |
| 257 | rm swift-5.1.4-RELEASE-ubuntu18.04.tar.gz && \ |
James E. King III | a3a7c6c | 2018-12-31 17:17:34 -0500 | [diff] [blame] | 258 | swift --version |
| 259 | |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 260 | # cppcheck-1.82 has a nasty cpp parser bug, so we're using something newer |
| 261 | RUN apt-get install -y --no-install-recommends \ |
| 262 | `# Static Code Analysis dependencies` \ |
| 263 | cppcheck \ |
| 264 | sloccount && \ |
| 265 | pip install flake8 && \ |
| 266 | wget -q "https://launchpad.net/ubuntu/+source/cppcheck/1.83-2/+build/14874703/+files/cppcheck_1.83-2_amd64.deb" && \ |
| 267 | dpkg -i cppcheck_1.83-2_amd64.deb && \ |
| 268 | rm cppcheck_1.83-2_amd64.deb |
| 269 | |
| 270 | # Clean up |
| 271 | RUN rm -rf /var/cache/apt/* && \ |
| 272 | rm -rf /var/lib/apt/lists/* && \ |
| 273 | rm -rf /tmp/* && \ |
| 274 | rm -rf /var/tmp/* |
| 275 | |
| 276 | ENV THRIFT_ROOT /thrift |
| 277 | RUN mkdir -p $THRIFT_ROOT/src |
| 278 | COPY Dockerfile $THRIFT_ROOT/ |
| 279 | WORKDIR $THRIFT_ROOT/src |