mirror of https://github.com/grpc/grpc.git
The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
https://grpc.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
3.5 KiB
63 lines
3.5 KiB
2 years ago
|
%YAML 1.2
|
||
|
--- |
|
||
|
# Copyright 2023 The gRPC Authors
|
||
|
#
|
||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
# you may not use this file except in compliance with the License.
|
||
|
# You may obtain a copy of the License at
|
||
|
#
|
||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||
|
#
|
||
|
# Unless required by applicable law or agreed to in writing, software
|
||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
# See the License for the specific language governing permissions and
|
||
|
# limitations under the License.
|
||
|
|
||
1 year ago
|
FROM ubuntu:20.04
|
||
2 years ago
|
|
||
1 year ago
|
# Workaround the "tzdata hangs apt-get install during docker image build" issue for ubuntu20.04
|
||
2 years ago
|
# by setting timezone to "Etc/UTC" in advance.
|
||
|
RUN echo "Etc/UTC" > /etc/timezone
|
||
|
|
||
|
RUN apt-get update && apt-get install -y build-essential curl git time wget zip && apt-get clean
|
||
|
|
||
|
<%include file="../../run_tests_python_deps.include"/>
|
||
|
|
||
|
# Some bazel tests expect "python" binary to exist
|
||
|
RUN ln -s /usr/bin/python3 /usr/bin/python
|
||
|
|
||
|
# Install Google's LLVM build for Ubuntu 20.04
|
||
|
# Heavily inspired by https://github.com/GoogleCloudPlatform/container-definitions/tree/master/ubuntu1804_rbe
|
||
|
# See go/llvm-docker
|
||
|
# Note that we are using the google's pre-built tools for multiple reasons:
|
||
|
# * this is what the "official" rbe-ubuntu18-04 image is using: See https://github.com/GoogleCloudPlatform/layer-definitions/tree/master/layers/ubuntu1804/clang
|
||
|
# * for sanitizers to work, we need MSAN and TSAN enabled versions of libc++
|
||
|
# Check https://storage.googleapis.com/clang-builds-stable/clang-ubuntu20_04/latest.txt
|
||
|
# for the value of LLVM_LATEST.
|
||
1 year ago
|
ARG LLVM_LATEST="f2b94bd7eaa83d853dc7568fac87b1f8bf4ddec6"
|
||
2 years ago
|
RUN wget -q https://storage.googleapis.com/clang-builds-stable/clang-ubuntu20_04/clang_r<%text>${LLVM_LATEST}</%text>.tar.gz -O /tmp/clang.tar.gz ${'\\'}
|
||
|
&& tar -xzf /tmp/clang.tar.gz -C /usr/local && rm /tmp/clang.tar.gz
|
||
|
RUN wget -q https://storage.googleapis.com/clang-builds-stable/clang-ubuntu20_04/libcxx_r<%text>${LLVM_LATEST}</%text>.tar.gz -O /tmp/libcxx.tar.gz ${'\\'}
|
||
|
&& tar -xzf /tmp/libcxx.tar.gz -C /usr/local && rm /tmp/libcxx.tar.gz
|
||
|
RUN wget -q https://storage.googleapis.com/clang-builds-stable/clang-ubuntu20_04/libcxx-msan_r<%text>${LLVM_LATEST}</%text>.tar.gz -O /tmp/libcxx-msan.tar.gz ${'\\'}
|
||
|
&& mkdir -p /usr/local/libcxx-msan && tar -xzf /tmp/libcxx-msan.tar.gz -C /usr/local/libcxx-msan && rm /tmp/libcxx-msan.tar.gz
|
||
|
RUN wget -q https://storage.googleapis.com/clang-builds-stable/clang-ubuntu20_04/libcxx-tsan_r<%text>${LLVM_LATEST}</%text>.tar.gz -O /tmp/libcxx-tsan.tar.gz ${'\\'}
|
||
|
&& mkdir -p /usr/local/libcxx-tsan && tar -xzf /tmp/libcxx-tsan.tar.gz -C /usr/local/libcxx-tsan && rm /tmp/libcxx-tsan.tar.gz
|
||
|
RUN wget -q https://storage.googleapis.com/clang-builds-stable/clang-ubuntu20_04/lld_r<%text>${LLVM_LATEST}</%text>.tar.gz -O /tmp/lld.tar.gz ${'\\'}
|
||
|
&& tar -xzf /tmp/lld.tar.gz -C /usr/local && rm /tmp/lld.tar.gz
|
||
|
|
||
|
ENV ASAN_SYMBOLIZER_PATH=/usr/local/bin/llvm-symbolizer
|
||
|
ENV CC=/usr/local/bin/clang
|
||
|
ENV GCOV=/dev/null
|
||
|
ENV LD_LIBRARY_PATH=/usr/local/lib/x86_64-unknown-linux-gnu
|
||
|
ENV MSAN_SYMBOLIZER_PATH=/usr/local/bin/llvm-symbolizer
|
||
|
ENV TSAN_SYMBOLIZER_PATH=/usr/local/bin/llvm-symbolizer
|
||
|
ENV UBSAN_SYMBOLIZER_PATH=/usr/local/bin/llvm-symbolizer
|
||
|
|
||
|
# TODO(jtattermusch): Remove python2 once some tests stop failing without it.
|
||
|
RUN apt-get update && apt-get install -y python2 && apt-get clean
|
||
|
|
||
|
# Define the default command.
|
||
|
CMD ["bash"]
|