James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [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 Artful |
| 15 | # Using all stock Ubuntu Artful packaging except for: |
| 16 | # - cpp: stock boost 1.62 in artful has a nasty bug so we use stock boost 1.63 |
James E. King III | d907cc9 | 2018-01-12 10:43:25 -0500 | [diff] [blame] | 17 | # - d: dmd does not come with Ubuntu |
Brian Forbis | c64389a | 2018-09-22 07:36:24 -0400 | [diff] [blame] | 18 | # - dart: does not come with Ubuntu. Pinned to last 1.x release |
James E. King III | d907cc9 | 2018-01-12 10:43:25 -0500 | [diff] [blame] | 19 | # - dotnet: does not come with Ubuntu |
| 20 | # - haxe: version 3.4.2 that comes with Ubuntu cores in our CI build |
Aki Sukegawa | b03d749 | 2018-06-08 11:39:34 +0900 | [diff] [blame] | 21 | # - go: artful comes with 1.9, we want the latest (supported) |
| 22 | # - nodejs: want v8, artful comes with v6 |
James E. King III | a37feaf | 2018-03-06 15:11:01 -0500 | [diff] [blame] | 23 | # |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 24 | |
| 25 | FROM buildpack-deps:artful-scm |
| 26 | MAINTAINER Apache Thrift <dev@thrift.apache.org> |
| 27 | ENV DEBIAN_FRONTEND noninteractive |
| 28 | |
Robert Lu | 31d5b7b | 2018-01-05 13:44:38 +0800 | [diff] [blame] | 29 | ### Add apt repos |
| 30 | |
Robert Lu | a15060a | 2017-12-28 15:29:39 +0800 | [diff] [blame] | 31 | RUN apt-get update && \ |
| 32 | apt-get dist-upgrade -y && \ |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 33 | apt-get install -y --no-install-recommends \ |
| 34 | apt \ |
| 35 | apt-transport-https \ |
| 36 | apt-utils \ |
| 37 | curl \ |
| 38 | dirmngr \ |
| 39 | software-properties-common \ |
| 40 | wget |
| 41 | |
Robert Lu | 31d5b7b | 2018-01-05 13:44:38 +0800 | [diff] [blame] | 42 | # Dart |
| 43 | RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ |
| 44 | curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > \ |
| 45 | /etc/apt/sources.list.d/dart_stable.list |
Brian Forbis | c64389a | 2018-09-22 07:36:24 -0400 | [diff] [blame] | 46 | ENV DART_VERSION 1.24.3-1 |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 47 | |
James E. King III | d907cc9 | 2018-01-12 10:43:25 -0500 | [diff] [blame] | 48 | # dotnet (netcore) |
| 49 | RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \ |
| 50 | echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" > \ |
| 51 | /etc/apt/sources.list.d/dotnetdev.list |
| 52 | |
| 53 | # haxe (https://haxe.org/download/linux/) |
| 54 | RUN add-apt-repository ppa:haxe/releases -y |
| 55 | |
| 56 | # node.js |
James E. King III | 78755f5 | 2018-03-06 09:50:33 -0500 | [diff] [blame] | 57 | RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ |
James E. King III | d907cc9 | 2018-01-12 10:43:25 -0500 | [diff] [blame] | 58 | echo "deb https://deb.nodesource.com/node_8.x artful main" | tee /etc/apt/sources.list.d/nodesource.list |
| 59 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 60 | ### install general dependencies |
Robert Lu | 31d5b7b | 2018-01-05 13:44:38 +0800 | [diff] [blame] | 61 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 62 | `# General dependencies` \ |
| 63 | bash-completion \ |
| 64 | bison \ |
| 65 | build-essential \ |
| 66 | clang \ |
| 67 | cmake \ |
| 68 | debhelper \ |
| 69 | flex \ |
| 70 | gdb \ |
| 71 | llvm \ |
| 72 | ninja-build \ |
| 73 | pkg-config \ |
| 74 | valgrind \ |
| 75 | vim |
| 76 | ENV PATH /usr/lib/llvm-3.8/bin:$PATH |
| 77 | |
| 78 | # boost-1.62 has a terrible bug in boost::test, see https://svn.boost.org/trac10/ticket/12507 |
| 79 | RUN apt-get install -y --no-install-recommends \ |
| 80 | `# C++ dependencies` \ |
| 81 | libboost1.63-all-dev \ |
| 82 | libevent-dev \ |
| 83 | libssl-dev \ |
| 84 | qt5-default \ |
| 85 | qtbase5-dev \ |
| 86 | qtbase5-dev-tools |
| 87 | |
Max-Gerd Retzlaff | 04057ac | 2022-08-23 17:38:34 +0200 | [diff] [blame] | 88 | ENV SBCL_VERSION 1.4.5 |
| 89 | RUN \ |
| 90 | `# Common Lisp (sbcl) dependencies` \ |
| 91 | curl --version && \ |
| 92 | curl -O -J -L https://kent.dl.sourceforge.net/project/sbcl/sbcl/${SBCL_VERSION}/sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 && \ |
| 93 | tar xjf sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 && \ |
| 94 | cd sbcl-${SBCL_VERSION}-x86-64-linux && \ |
| 95 | ./install.sh && \ |
| 96 | sbcl --version && \ |
| 97 | rm -rf sbcl* |
| 98 | |
Aki Sukegawa | b03d749 | 2018-06-08 11:39:34 +0900 | [diff] [blame] | 99 | ENV D_VERSION 2.080.0 |
| 100 | ENV DMD_DEB dmd_2.080.0-0_amd64.deb |
James E. King III | bf7f76b | 2018-02-28 17:11:05 -0500 | [diff] [blame] | 101 | RUN \ |
| 102 | `# D dependencies` \ |
| 103 | wget -q http://downloads.dlang.org/releases/2.x/${D_VERSION}/${DMD_DEB} && \ |
| 104 | dpkg --install ${DMD_DEB} && \ |
| 105 | rm -f ${DMD_DEB} && \ |
| 106 | mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ |
James E. King III | f338d57 | 2018-01-29 14:51:24 -0500 | [diff] [blame] | 107 | curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \ |
| 108 | mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ |
| 109 | mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \ |
James E. King III | bf7f76b | 2018-02-28 17:11:05 -0500 | [diff] [blame] | 110 | rm -rf libevent-master && \ |
| 111 | curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \ |
James E. King III | f338d57 | 2018-01-29 14:51:24 -0500 | [diff] [blame] | 112 | mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ |
| 113 | mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \ |
| 114 | rm -rf openssl-master |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 115 | |
Robert Lu | 31d5b7b | 2018-01-05 13:44:38 +0800 | [diff] [blame] | 116 | RUN apt-get install -y --no-install-recommends \ |
Mario Emmenlauer | 96ed727 | 2021-08-30 10:54:39 +0200 | [diff] [blame] | 117 | `# Dart dependencies` \ |
Brian Forbis | c64389a | 2018-09-22 07:36:24 -0400 | [diff] [blame] | 118 | dart=$DART_VERSION |
James E. King, III | 6e883f9 | 2017-11-18 21:18:05 -0500 | [diff] [blame] | 119 | ENV PATH /usr/lib/dart/bin:$PATH |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 120 | |
James E. King, III | 6e883f9 | 2017-11-18 21:18:05 -0500 | [diff] [blame] | 121 | RUN apt-get install -y --no-install-recommends \ |
| 122 | `# dotnet core dependencies` \ |
Jens Geyer | 51fc54f | 2023-02-14 23:51:16 +0100 | [diff] [blame] | 123 | dotnet-sdk-7.0 \ |
| 124 | dotnet-runtime-7.0 \ |
| 125 | aspnetcore-runtime-7.0 \ |
| 126 | dotnet-apphost-pack-7.0 |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 127 | |
| 128 | RUN apt-get install -y --no-install-recommends \ |
| 129 | `# Erlang dependencies` \ |
| 130 | erlang-base \ |
| 131 | erlang-eunit \ |
| 132 | erlang-dev \ |
| 133 | erlang-tools \ |
| 134 | rebar |
| 135 | |
| 136 | RUN apt-get install -y --no-install-recommends \ |
| 137 | `# GlibC dependencies` \ |
| 138 | libglib2.0-dev |
| 139 | |
John Boiles | 5785279 | 2018-01-05 14:37:05 -0800 | [diff] [blame] | 140 | # golang |
D. Can Celasun | a9efd1a | 2018-03-15 12:52:37 +0100 | [diff] [blame] | 141 | ENV GOLANG_VERSION 1.10 |
John Boiles | 5785279 | 2018-01-05 14:37:05 -0800 | [diff] [blame] | 142 | ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz |
D. Can Celasun | a9efd1a | 2018-03-15 12:52:37 +0100 | [diff] [blame] | 143 | ENV GOLANG_DOWNLOAD_SHA256 b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33 |
John Boiles | 5785279 | 2018-01-05 14:37:05 -0800 | [diff] [blame] | 144 | RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz && \ |
| 145 | echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - && \ |
| 146 | tar -C /usr/local -xzf golang.tar.gz && \ |
| 147 | ln -s /usr/local/go/bin/go /usr/local/bin && \ |
| 148 | rm golang.tar.gz |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 149 | |
| 150 | RUN apt-get install -y --no-install-recommends \ |
James E. King III | d907cc9 | 2018-01-12 10:43:25 -0500 | [diff] [blame] | 151 | `# Haxe dependencies` \ |
| 152 | haxe \ |
| 153 | neko \ |
| 154 | neko-dev && \ |
| 155 | haxelib setup --always /usr/share/haxe/lib && \ |
| 156 | haxelib install --always hxcpp 2>&1 > /dev/null |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 157 | |
| 158 | RUN apt-get install -y --no-install-recommends \ |
| 159 | `# Java dependencies` \ |
| 160 | ant \ |
| 161 | ant-optional \ |
| 162 | openjdk-8-jdk \ |
| 163 | maven |
| 164 | |
| 165 | RUN apt-get install -y --no-install-recommends \ |
| 166 | `# Lua dependencies` \ |
James E. King, III | 39eaae6 | 2017-11-19 20:17:33 -0500 | [diff] [blame] | 167 | lua5.2 \ |
| 168 | lua5.2-dev |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 169 | # https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212 |
| 170 | # lua5.3 does not install alternatives! |
James E. King, III | 39eaae6 | 2017-11-19 20:17:33 -0500 | [diff] [blame] | 171 | # need to update our luasocket code, lua doesn't have luaL_openlib any more |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 172 | |
| 173 | RUN apt-get install -y --no-install-recommends \ |
| 174 | `# Node.js dependencies` \ |
James E. King, III | 619218c | 2017-10-29 06:55:00 -0400 | [diff] [blame] | 175 | nodejs |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 176 | |
Brian Forbis | b5d6ea3 | 2018-08-25 23:39:29 -0400 | [diff] [blame] | 177 | # Test dependencies for running puppeteer |
| 178 | RUN apt-get install -y --no-install-recommends \ |
| 179 | `# JS dependencies` \ |
| 180 | libxss1 |
| 181 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 182 | RUN apt-get install -y --no-install-recommends \ |
| 183 | `# OCaml dependencies` \ |
| 184 | ocaml \ |
| 185 | opam && \ |
| 186 | opam init --yes && \ |
| 187 | opam install --yes oasis |
| 188 | |
| 189 | RUN apt-get install -y --no-install-recommends \ |
| 190 | `# Perl dependencies` \ |
| 191 | libbit-vector-perl \ |
| 192 | libclass-accessor-class-perl \ |
| 193 | libcrypt-ssleay-perl \ |
| 194 | libio-socket-ssl-perl \ |
| 195 | libnet-ssleay-perl |
| 196 | |
| 197 | RUN apt-get install -y --no-install-recommends \ |
| 198 | `# Php dependencies` \ |
| 199 | php \ |
| 200 | php-cli \ |
| 201 | php-dev \ |
| 202 | php-pear \ |
| 203 | re2c \ |
Robert Lu | a15060a | 2017-12-28 15:29:39 +0800 | [diff] [blame] | 204 | composer |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 205 | |
| 206 | RUN apt-get install -y --no-install-recommends \ |
| 207 | `# Python dependencies` \ |
| 208 | python-all \ |
| 209 | python-all-dbg \ |
| 210 | python-all-dev \ |
| 211 | python-ipaddress \ |
| 212 | python-pip \ |
| 213 | python-setuptools \ |
| 214 | python-six \ |
| 215 | python-tornado \ |
| 216 | python-twisted \ |
| 217 | python-wheel \ |
| 218 | python-zope.interface && \ |
| 219 | pip install --upgrade backports.ssl_match_hostname |
| 220 | |
| 221 | RUN apt-get install -y --no-install-recommends \ |
| 222 | `# Python3 dependencies` \ |
| 223 | python3-all \ |
| 224 | python3-all-dbg \ |
| 225 | python3-all-dev \ |
| 226 | python3-pip \ |
| 227 | python3-setuptools \ |
| 228 | python3-six \ |
| 229 | python3-tornado \ |
| 230 | python3-twisted \ |
| 231 | python3-wheel \ |
| 232 | python3-zope.interface |
| 233 | |
| 234 | RUN apt-get install -y --no-install-recommends \ |
| 235 | `# Ruby dependencies` \ |
| 236 | ruby \ |
| 237 | ruby-dev \ |
| 238 | ruby-bundler |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 239 | |
| 240 | RUN apt-get install -y --no-install-recommends \ |
| 241 | `# Rust dependencies` \ |
| 242 | cargo \ |
| 243 | rustc |
| 244 | |
| 245 | RUN apt-get install -y --no-install-recommends \ |
| 246 | `# Static Code Analysis dependencies` \ |
| 247 | cppcheck \ |
| 248 | sloccount && \ |
| 249 | pip install flake8 |
| 250 | |
| 251 | # Clean up |
| 252 | RUN rm -rf /var/cache/apt/* && \ |
| 253 | rm -rf /var/lib/apt/lists/* && \ |
| 254 | rm -rf /tmp/* && \ |
| 255 | rm -rf /var/tmp/* |
| 256 | |
| 257 | ENV THRIFT_ROOT /thrift |
| 258 | RUN mkdir -p $THRIFT_ROOT/src |
| 259 | COPY Dockerfile $THRIFT_ROOT/ |
| 260 | WORKDIR $THRIFT_ROOT/src |