Dockerfile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Copyright 2015 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 \
  17. autoconf \
  18. automake \
  19. bzip2 \
  20. build-base \
  21. cmake \
  22. ccache \
  23. curl \
  24. gcc \
  25. git \
  26. libtool \
  27. linux-headers \
  28. make \
  29. perl \
  30. strace \
  31. python3 \
  32. py3-pip \
  33. unzip \
  34. wget \
  35. zip
  36. # use pinned version of pip to avoid sudden breakages
  37. RUN python3 -m pip install --upgrade pip==19.3.1
  38. # TODO(jtattermusch): currently six is needed for tools/run_tests scripts
  39. # but since our python2 usage is deprecated, we should get rid of it.
  40. RUN python3 -m pip install six==1.16.0
  41. # Google Cloud Platform API libraries
  42. # These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts)
  43. RUN python3 -m pip install --upgrade google-auth==1.24.0 google-api-python-client==1.12.8 oauth2client==4.1.0
  44. RUN python3 -m pip install --upgrade --ignore-installed PyYAML==5.4.1 --user
  45. #=================
  46. # Install ccache
  47. # Install ccache from source since ccache 3.x packaged with most linux distributions
  48. # does not support Redis backend for caching.
  49. RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \
  50. && tar -zxf ccache.tar.gz \
  51. && cd ccache-4.5.1 \
  52. && mkdir build && cd build \
  53. && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \
  54. && make -j4 && make install \
  55. && cd ../.. \
  56. && rm -rf ccache-4.5.1 ccache.tar.gz
  57. RUN mkdir /var/local/jenkins
  58. # Define the default command.
  59. CMD ["bash"]