| 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 && \ | 
| Allen George | b0d1413 | 2020-03-29 11:48:55 -0400 | [diff] [blame] | 26 | apt-get install -y --no-install-recommends --fix-missing \ | 
| James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 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 |  | 
| aaronstgeorge-wf | 1ab156a | 2020-10-01 17:28:28 +0200 | [diff] [blame] | 121 | ENV DART_VERSION 2.7.2-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 | 526a1ac | 2021-02-13 13:58:09 +0100 | [diff] [blame] | 129 | dotnet-sdk-5.0 | 
| 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 | 
| Yuxuan 'fishy' Wang | b71f11e | 2021-03-22 15:01:00 -0700 | [diff] [blame] | 143 | ENV GOLANG_VERSION 1.16.2 | 
| 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 | 
| Yuxuan 'fishy' Wang | b71f11e | 2021-03-22 15:01:00 -0700 | [diff] [blame] | 145 | ENV GOLANG_DOWNLOAD_SHA256 542e936b19542e62679766194364f45141fde55169db2d8d01046555ca9eb4b8 | 
| 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 \ | 
| James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 153 | `# Haxe dependencies` \ | 
|  | 154 | haxe \ | 
|  | 155 | neko \ | 
|  | 156 | neko-dev && \ | 
|  | 157 | haxelib setup --always /usr/share/haxe/lib && \ | 
|  | 158 | haxelib install --always hxcpp 2>&1 > /dev/null | 
|  | 159 |  | 
|  | 160 | RUN apt-get install -y --no-install-recommends \ | 
|  | 161 | `# Java dependencies` \ | 
|  | 162 | ant \ | 
|  | 163 | ant-optional \ | 
| Fokko Driesprong | 1686c87 | 2019-02-01 20:31:58 +0100 | [diff] [blame] | 164 | maven \ | 
|  | 165 | openjdk-11-jdk-headless | 
| James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 166 |  | 
|  | 167 | RUN apt-get install -y --no-install-recommends \ | 
|  | 168 | `# Lua dependencies` \ | 
|  | 169 | lua5.2 \ | 
|  | 170 | lua5.2-dev | 
|  | 171 | # https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212 | 
|  | 172 | # lua5.3 does not install alternatives! | 
|  | 173 | # need to update our luasocket code, lua doesn't have luaL_openlib any more | 
|  | 174 |  | 
|  | 175 | RUN apt-get install -y --no-install-recommends \ | 
|  | 176 | `# Node.js dependencies` \ | 
|  | 177 | nodejs | 
|  | 178 |  | 
| Brian Forbis | b5d6ea3 | 2018-08-25 23:39:29 -0400 | [diff] [blame] | 179 | # Test dependencies for running puppeteer | 
|  | 180 | RUN apt-get install -y --no-install-recommends \ | 
|  | 181 | `# JS dependencies` \ | 
|  | 182 | libxss1 | 
|  | 183 |  | 
| James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 184 | RUN apt-get install -y --no-install-recommends \ | 
|  | 185 | `# OCaml dependencies` \ | 
|  | 186 | ocaml \ | 
|  | 187 | opam && \ | 
|  | 188 | opam init --yes && \ | 
|  | 189 | opam install --yes oasis | 
|  | 190 |  | 
|  | 191 | RUN apt-get install -y --no-install-recommends \ | 
|  | 192 | `# Perl dependencies` \ | 
|  | 193 | libbit-vector-perl \ | 
|  | 194 | libclass-accessor-class-perl \ | 
|  | 195 | libcrypt-ssleay-perl \ | 
|  | 196 | libio-socket-ssl-perl \ | 
| Kengo Seki | cb4c31a | 2019-12-26 14:34:57 +0900 | [diff] [blame] | 197 | libnet-ssleay-perl \ | 
|  | 198 | libtest-exception-perl | 
| James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 199 |  | 
|  | 200 | RUN apt-get install -y --no-install-recommends \ | 
|  | 201 | `# Php dependencies` \ | 
|  | 202 | php \ | 
|  | 203 | php-cli \ | 
|  | 204 | php-dev \ | 
| James E. King III | e53d23c | 2019-02-10 11:13:23 -0500 | [diff] [blame] | 205 | php-json \ | 
| James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 206 | php-pear \ | 
|  | 207 | re2c \ | 
|  | 208 | composer | 
|  | 209 |  | 
|  | 210 | RUN apt-get install -y --no-install-recommends \ | 
|  | 211 | `# Python dependencies` \ | 
|  | 212 | python-all \ | 
|  | 213 | python-all-dbg \ | 
|  | 214 | python-all-dev \ | 
|  | 215 | python-ipaddress \ | 
|  | 216 | python-pip \ | 
|  | 217 | python-setuptools \ | 
|  | 218 | python-six \ | 
|  | 219 | python-tornado \ | 
|  | 220 | python-twisted \ | 
|  | 221 | python-wheel \ | 
|  | 222 | python-zope.interface && \ | 
|  | 223 | pip install --upgrade backports.ssl_match_hostname | 
|  | 224 |  | 
|  | 225 | RUN apt-get install -y --no-install-recommends \ | 
|  | 226 | `# Python3 dependencies` \ | 
|  | 227 | python3-all \ | 
|  | 228 | python3-all-dbg \ | 
|  | 229 | python3-all-dev \ | 
|  | 230 | python3-pip \ | 
|  | 231 | python3-setuptools \ | 
|  | 232 | python3-six \ | 
|  | 233 | python3-tornado \ | 
|  | 234 | python3-twisted \ | 
|  | 235 | python3-wheel \ | 
|  | 236 | python3-zope.interface | 
|  | 237 |  | 
|  | 238 | RUN apt-get install -y --no-install-recommends \ | 
|  | 239 | `# Ruby dependencies` \ | 
|  | 240 | ruby \ | 
|  | 241 | ruby-dev \ | 
|  | 242 | ruby-bundler | 
|  | 243 |  | 
| Danny Browning | 181d900 | 2019-04-15 09:50:24 -0600 | [diff] [blame] | 244 | # Rust dependencies | 
| Allen George | b0d1413 | 2020-03-29 11:48:55 -0400 | [diff] [blame] | 245 | RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.40.0 -y | 
| James E. King III | 93ff9b0 | 2019-06-21 17:50:34 -0400 | [diff] [blame] | 246 | ENV PATH /root/.cargo/bin:$PATH | 
| James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 247 |  | 
| James E. King III | a3a7c6c | 2018-12-31 17:17:34 -0500 | [diff] [blame] | 248 | # Swift on Linux for cross tests | 
|  | 249 | RUN cd / && \ | 
| Jano Svitok | 2e11577 | 2020-03-06 09:01:43 +0100 | [diff] [blame] | 250 | 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 && \ | 
|  | 251 | tar xf swift-5.1.4-RELEASE-ubuntu18.04.tar.gz --strip-components=1 && \ | 
|  | 252 | rm swift-5.1.4-RELEASE-ubuntu18.04.tar.gz && \ | 
| James E. King III | a3a7c6c | 2018-12-31 17:17:34 -0500 | [diff] [blame] | 253 | swift --version | 
|  | 254 |  | 
| James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 255 | # cppcheck-1.82 has a nasty cpp parser bug, so we're using something newer | 
|  | 256 | RUN apt-get install -y --no-install-recommends \ | 
|  | 257 | `# Static Code Analysis dependencies` \ | 
|  | 258 | cppcheck \ | 
|  | 259 | sloccount && \ | 
|  | 260 | pip install flake8 && \ | 
|  | 261 | wget -q "https://launchpad.net/ubuntu/+source/cppcheck/1.83-2/+build/14874703/+files/cppcheck_1.83-2_amd64.deb" && \ | 
|  | 262 | dpkg -i cppcheck_1.83-2_amd64.deb && \ | 
|  | 263 | rm cppcheck_1.83-2_amd64.deb | 
|  | 264 |  | 
|  | 265 | # Clean up | 
|  | 266 | RUN rm -rf /var/cache/apt/* && \ | 
|  | 267 | rm -rf /var/lib/apt/lists/* && \ | 
|  | 268 | rm -rf /tmp/* && \ | 
|  | 269 | rm -rf /var/tmp/* | 
|  | 270 |  | 
|  | 271 | ENV THRIFT_ROOT /thrift | 
|  | 272 | RUN mkdir -p $THRIFT_ROOT/src | 
|  | 273 | COPY Dockerfile $THRIFT_ROOT/ | 
|  | 274 | WORKDIR $THRIFT_ROOT/src |