Dockerfile.template 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. %YAML 1.2
  2. --- |
  3. # Copyright 2015 gRPC authors.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. FROM silkeh/clang:13
  17. <%include file="../../apt_get_basic.include"/>
  18. <%include file="../../cxx_deps.include"/>
  19. # Install Python 3.7 from source (and installed as a default python3)
  20. # (Bullseye comes with Python 3.9 which isn't supported by pytype yet)
  21. RUN apt update && apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev ${'\\'}
  22. libnss3-dev libssl-dev libreadline-dev libffi-dev libbz2-dev
  23. RUN curl -O https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tar.xz && ${'\\'}
  24. tar -xf Python-3.7.9.tar.xz && ${'\\'}
  25. cd Python-3.7.9 && ${'\\'}
  26. ./configure && ${'\\'}
  27. make -j 4 && ${'\\'}
  28. make install
  29. RUN curl https://bootstrap.pypa.io/get-pip.py | python3
  30. <%include file="../../gcp_api_libraries.include"/>
  31. <%include file="../../run_tests_addons.include"/>
  32. #========================
  33. # Sanity test dependencies
  34. RUN apt-get update && apt-get install -y ${"\\"}
  35. autoconf ${"\\"}
  36. automake ${"\\"}
  37. libtool ${"\\"}
  38. curl ${"\\"}
  39. shellcheck
  40. # otherwise clang-tidy will report missing <gtest/gtest.h> header
  41. RUN apt-get update && apt-get install -y libgtest-dev && apt-get clean
  42. RUN python3 -m pip install simplejson mako virtualenv==16.7.9 lxml six
  43. # Upgrade Python's YAML library
  44. RUN python3 -m pip install --upgrade --ignore-installed PyYAML==5.4.1 --user
  45. # Install prerequisites for the clang-tidy script
  46. RUN apt-get update && apt-get install -y jq git
  47. <%include file="../../bazel.include"/>
  48. <%include file="../../buildifier.include"/>
  49. # Define the default command.
  50. CMD ["bash"]