Dockerfile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Copyright 2018 The gRPC Authors
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. FROM alpine:3.11
  15. # Install Git and basic packages.
  16. RUN apk update && apk add autoconf automake bzip2 build-base cmake ccache curl gcc git libtool linux-headers make perl strace python3-dev py3-pip unzip wget zip
  17. RUN ln -s /usr/bin/pip3 /usr/bin/pip
  18. RUN ln -s /usr/bin/python3 /usr/bin/python
  19. # Install Python packages from PyPI
  20. RUN python3 -m pip install --upgrade pip==19.3.1
  21. RUN python3 -m pip install virtualenv
  22. RUN python3 -m pip install futures==3.1.1 enum34==1.1.10 protobuf==3.5.2.post1 six==1.16.0
  23. # Google Cloud Platform API libraries
  24. # These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts)
  25. RUN python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0
  26. #=================
  27. # Install ccache
  28. # Install ccache from source since ccache 3.x packaged with most linux distributions
  29. # does not support Redis backend for caching.
  30. RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \
  31. && tar -zxf ccache.tar.gz \
  32. && cd ccache-4.5.1 \
  33. && mkdir build && cd build \
  34. && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \
  35. && make -j4 && make install \
  36. && cd ../.. \
  37. && rm -rf ccache-4.5.1 ccache.tar.gz