James E. King III | 90a0446 | 2019-07-23 22:50:28 -0400 | [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 Disco |
| 15 | # with some updated packages. |
| 16 | # |
| 17 | |
| 18 | FROM buildpack-deps:disco-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 | |
| 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 | |
| 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 disco contrib" | tee /etc/apt/sources.list.d/erlang.list |
| 49 | |
| 50 | # node.js |
| 51 | RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ |
| 52 | echo "deb https://deb.nodesource.com/node_10.x disco main" | tee /etc/apt/sources.list.d/nodesource.list |
| 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 \ |
| 65 | libasound2 \ |
| 66 | libatk-bridge2.0-0 \ |
| 67 | libgtk-3-0 \ |
| 68 | llvm \ |
| 69 | ninja-build \ |
| 70 | pkg-config \ |
| 71 | unzip \ |
| 72 | valgrind \ |
| 73 | vim |
| 74 | ENV PATH /usr/lib/llvm-6.0/bin:$PATH |
| 75 | |
| 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 | |
| 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 | |
Max-Gerd Retzlaff | 04057ac | 2022-08-23 17:38:34 +0200 | [diff] [blame] | 92 | ENV SBCL_VERSION 1.5.3 |
| 93 | RUN \ |
| 94 | `# Common Lisp (sbcl) dependencies` \ |
| 95 | curl --version && \ |
| 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# && \ |
| 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 | 90a0446 | 2019-07-23 22:50:28 -0400 | [diff] [blame] | 104 | ENV D_VERSION 2.087.0 |
| 105 | ENV DMD_DEB dmd_2.087.0-0_amd64.deb |
| 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 && \ |
| 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 && \ |
| 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 |
| 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 | 90a0446 | 2019-07-23 22:50:28 -0400 | [diff] [blame] | 122 | RUN apt-get install -y --no-install-recommends \ |
Mario Emmenlauer | 96ed727 | 2021-08-30 10:54:39 +0200 | [diff] [blame] | 123 | `# Dart dependencies` \ |
James E. King III | 90a0446 | 2019-07-23 22:50:28 -0400 | [diff] [blame] | 124 | dart=$DART_VERSION |
| 125 | ENV PATH /usr/lib/dart/bin:$PATH |
| 126 | |
| 127 | RUN apt-get install -y --no-install-recommends \ |
| 128 | `# dotnet core dependencies` \ |
Jens Geyer | 4c7b9fd | 2021-12-04 22:48:37 +0100 | [diff] [blame] | 129 | dotnet-sdk-6.0 \ |
| 130 | dotnet-runtime-6.0 \ |
| 131 | aspnetcore-runtime-6.0 \ |
| 132 | dotnet-apphost-pack-6.0 |
James E. King III | 90a0446 | 2019-07-23 22:50:28 -0400 | [diff] [blame] | 133 | |
| 134 | RUN apt-get install -y --no-install-recommends \ |
| 135 | `# Erlang dependencies` \ |
| 136 | erlang && \ |
| 137 | wget https://s3.amazonaws.com/rebar3/rebar3 -O /usr/bin/rebar3 && \ |
| 138 | chmod 755 /usr/bin/rebar3 && \ |
| 139 | rebar3 --version |
| 140 | |
| 141 | RUN apt-get install -y --no-install-recommends \ |
| 142 | `# GlibC dependencies` \ |
| 143 | libglib2.0-dev |
| 144 | |
| 145 | # golang |
Yuxuan 'fishy' Wang | 3f9b7d0 | 2022-08-02 11:31:14 -0700 | [diff] [blame] | 146 | ENV GOLANG_VERSION 1.19 |
Yuxuan 'fishy' Wang | bbc7c5f | 2022-01-10 11:44:23 -0800 | [diff] [blame] | 147 | ENV GOLANG_DOWNLOAD_URL https://go.dev/dl/go$GOLANG_VERSION.linux-amd64.tar.gz |
Yuxuan 'fishy' Wang | 3f9b7d0 | 2022-08-02 11:31:14 -0700 | [diff] [blame] | 148 | ENV GOLANG_DOWNLOAD_SHA256 464b6b66591f6cf055bc5df90a9750bf5fbc9d038722bb84a9d56a2bea974be6 |
James E. King III | 90a0446 | 2019-07-23 22:50:28 -0400 | [diff] [blame] | 149 | RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz && \ |
| 150 | echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - && \ |
| 151 | tar -C /usr/local -xzf golang.tar.gz && \ |
| 152 | ln -s /usr/local/go/bin/go /usr/local/bin && \ |
| 153 | rm golang.tar.gz |
| 154 | |
| 155 | RUN apt-get install -y --no-install-recommends \ |
James E. King III | 90a0446 | 2019-07-23 22:50:28 -0400 | [diff] [blame] | 156 | `# Haxe dependencies` \ |
| 157 | haxe \ |
| 158 | neko \ |
| 159 | neko-dev && \ |
| 160 | haxelib setup --always /usr/share/haxe/lib && \ |
| 161 | haxelib install --always hxcpp 2>&1 > /dev/null |
| 162 | |
Jiayu Liu | 5b15838 | 2022-05-12 00:20:37 +0800 | [diff] [blame] | 163 | ENV GRADLE_VERSION="7.4.2" |
James E. King III | 90a0446 | 2019-07-23 22:50:28 -0400 | [diff] [blame] | 164 | RUN apt-get install -y --no-install-recommends \ |
| 165 | `# Java dependencies` \ |
| 166 | ant \ |
| 167 | ant-optional \ |
| 168 | maven \ |
Jiayu Liu | 5d220eb | 2022-04-19 04:18:58 +0200 | [diff] [blame] | 169 | openjdk-11-jdk-headless && \ |
| 170 | `# Gradle` \ |
| 171 | wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O /tmp/gradle-$GRADLE_VERSION-bin.zip && \ |
Jiayu Liu | 5b15838 | 2022-05-12 00:20:37 +0800 | [diff] [blame] | 172 | (echo "29e49b10984e585d8118b7d0bc452f944e386458df27371b49b4ac1dec4b7fda /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -) && \ |
Jiayu Liu | 5d220eb | 2022-04-19 04:18:58 +0200 | [diff] [blame] | 173 | unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip && \ |
| 174 | mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle && \ |
| 175 | ln -s /usr/local/gradle/bin/gradle /usr/local/bin |
James E. King III | 90a0446 | 2019-07-23 22:50:28 -0400 | [diff] [blame] | 176 | |
| 177 | RUN apt-get install -y --no-install-recommends \ |
| 178 | `# Lua dependencies` \ |
| 179 | lua5.2 \ |
| 180 | lua5.2-dev |
| 181 | # https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212 |
| 182 | # lua5.3 does not install alternatives! |
| 183 | # need to update our luasocket code, lua doesn't have luaL_openlib any more |
| 184 | |
| 185 | RUN apt-get install -y --no-install-recommends \ |
| 186 | `# Node.js dependencies` \ |
| 187 | nodejs |
| 188 | |
| 189 | # Test dependencies for running puppeteer |
| 190 | RUN apt-get install -y --no-install-recommends \ |
| 191 | `# JS dependencies` \ |
Yuxuan 'fishy' Wang | 0f73558 | 2021-04-28 08:33:36 -0700 | [diff] [blame] | 192 | libxss1 \ |
| 193 | libxtst6 |
James E. King III | 90a0446 | 2019-07-23 22:50:28 -0400 | [diff] [blame] | 194 | |
| 195 | # does not work on disco? |
| 196 | # RUN apt-get install -y --no-install-recommends \ |
| 197 | # `# OCaml dependencies` \ |
| 198 | # ocaml \ |
| 199 | # opam && \ |
| 200 | # opam init --yes && \ |
| 201 | # opam install --yes oasis |
| 202 | |
| 203 | RUN apt-get install -y --no-install-recommends \ |
| 204 | `# Perl dependencies` \ |
| 205 | libbit-vector-perl \ |
| 206 | libclass-accessor-class-perl \ |
| 207 | libcrypt-ssleay-perl \ |
| 208 | libio-socket-ssl-perl \ |
Kengo Seki | cb4c31a | 2019-12-26 14:34:57 +0900 | [diff] [blame] | 209 | libnet-ssleay-perl \ |
| 210 | libtest-exception-perl |
James E. King III | 90a0446 | 2019-07-23 22:50:28 -0400 | [diff] [blame] | 211 | |
| 212 | RUN apt-get install -y --no-install-recommends \ |
| 213 | `# Php dependencies` \ |
| 214 | php \ |
| 215 | php-cli \ |
| 216 | php-dev \ |
| 217 | php-json \ |
| 218 | php-pear \ |
| 219 | re2c \ |
| 220 | composer |
| 221 | |
| 222 | RUN apt-get install -y --no-install-recommends \ |
| 223 | `# Python dependencies` \ |
| 224 | python-all \ |
| 225 | python-all-dbg \ |
| 226 | python-all-dev \ |
| 227 | python-ipaddress \ |
| 228 | python-pip \ |
| 229 | python-setuptools \ |
| 230 | python-six \ |
| 231 | python-tornado \ |
| 232 | python-twisted \ |
| 233 | python-wheel \ |
| 234 | python-zope.interface && \ |
| 235 | pip install --upgrade backports.ssl_match_hostname |
| 236 | |
| 237 | RUN apt-get install -y --no-install-recommends \ |
| 238 | `# Python3 dependencies` \ |
| 239 | python3-all \ |
| 240 | python3-all-dbg \ |
| 241 | python3-all-dev \ |
| 242 | python3-pip \ |
| 243 | python3-setuptools \ |
| 244 | python3-six \ |
| 245 | python3-tornado \ |
| 246 | python3-twisted \ |
| 247 | python3-wheel \ |
| 248 | python3-zope.interface |
| 249 | |
| 250 | RUN apt-get install -y --no-install-recommends \ |
| 251 | `# Ruby dependencies` \ |
| 252 | ruby \ |
| 253 | ruby-dev \ |
| 254 | ruby-bundler |
| 255 | |
| 256 | # Rust dependencies |
Allen George | b0d1413 | 2020-03-29 11:48:55 -0400 | [diff] [blame] | 257 | RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.40.0 -y |
James E. King III | 90a0446 | 2019-07-23 22:50:28 -0400 | [diff] [blame] | 258 | ENV PATH /root/.cargo/bin:$PATH |
| 259 | |
| 260 | # Swift on Linux for cross tests |
| 261 | # does not work on disco |
| 262 | # RUN cd / && \ |
| 263 | # wget --quiet https://swift.org/builds/swift-4.2.1-release/ubuntu1804/swift-4.2.1-RELEASE/swift-4.2.1-RELEASE-ubuntu18.04.tar.gz && \ |
| 264 | # tar xf swift-4.2.1-RELEASE-ubuntu18.04.tar.gz --strip-components=1 && \ |
| 265 | # rm swift-4.2.1-RELEASE-ubuntu18.04.tar.gz && \ |
| 266 | # swift --version |
| 267 | |
ubuntu | 323f032 | 2021-05-31 19:08:05 +0530 | [diff] [blame] | 268 | # Locale(s) for cpp unit tests |
| 269 | RUN apt-get install -y --no-install-recommends \ |
| 270 | `# Locale dependencies` \ |
| 271 | locales && \ |
| 272 | locale-gen en_US.UTF-8 && \ |
ubuntu | ad76a18 | 2021-06-07 08:21:05 +0530 | [diff] [blame] | 273 | locale-gen de_DE.UTF-8 && \ |
ubuntu | 323f032 | 2021-05-31 19:08:05 +0530 | [diff] [blame] | 274 | update-locale |
| 275 | |
James E. King III | 90a0446 | 2019-07-23 22:50:28 -0400 | [diff] [blame] | 276 | # cppcheck-1.82 has a nasty cpp parser bug, so we're using something newer |
| 277 | # don't need this on disco, nobody uses it |
| 278 | # RUN apt-get install -y --no-install-recommends \ |
| 279 | # `# Static Code Analysis dependencies` \ |
| 280 | # cppcheck \ |
| 281 | # sloccount && \ |
| 282 | # pip install flake8 && \ |
| 283 | # wget -q "https://launchpad.net/ubuntu/+source/cppcheck/1.83-2/+build/14874703/+files/cppcheck_1.83-2_amd64.deb" && \ |
| 284 | # dpkg -i cppcheck_1.83-2_amd64.deb && \ |
| 285 | # rm cppcheck_1.83-2_amd64.deb |
| 286 | |
| 287 | # Clean up |
| 288 | RUN rm -rf /var/cache/apt/* && \ |
| 289 | rm -rf /var/lib/apt/lists/* && \ |
| 290 | rm -rf /tmp/* && \ |
| 291 | rm -rf /var/tmp/* |
| 292 | |
| 293 | ENV THRIFT_ROOT /thrift |
| 294 | RUN mkdir -p $THRIFT_ROOT/src |
| 295 | COPY Dockerfile $THRIFT_ROOT/ |
| 296 | WORKDIR $THRIFT_ROOT/src |