Dockerfile_centos_8 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. 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. # Dockerfile for installing the necessary dependencies for building Hadoop.
  17. # See BUILDING.txt.
  18. FROM centos:8
  19. WORKDIR /root
  20. SHELL ["/bin/bash", "-o", "pipefail", "-c"]
  21. ######
  22. # Platform package dependency resolver
  23. ######
  24. COPY pkg-resolver pkg-resolver
  25. RUN chmod a+x pkg-resolver/*.sh pkg-resolver/*.py \
  26. && chmod a+r pkg-resolver/*.json
  27. ######
  28. # Install packages from yum
  29. ######
  30. # hadolint ignore=DL3008,SC2046
  31. RUN yum update -y \
  32. && yum install -y python3 \
  33. && yum install -y $(pkg-resolver/resolve.py centos:8)
  34. ####
  35. # Install EPEL
  36. ####
  37. RUN pkg-resolver/install-epel.sh centos:8
  38. RUN dnf --enablerepo=powertools install -y \
  39. doxygen \
  40. snappy-devel \
  41. yasm
  42. RUN dnf install -y \
  43. bouncycastle \
  44. gcc-toolset-9-gcc \
  45. gcc-toolset-9-gcc-c++ \
  46. nodejs \
  47. npm \
  48. libpmem-devel
  49. # Set GCC 9 as the default C/C++ compiler
  50. RUN echo "source /opt/rh/gcc-toolset-9/enable" >> /etc/bashrc
  51. SHELL ["/bin/bash", "--login", "-c"]
  52. # TODO: Set locale
  53. ######
  54. # Set env vars required to build Hadoop
  55. ######
  56. ENV MAVEN_HOME /opt/maven
  57. ENV PATH "${PATH}:${MAVEN_HOME}/bin"
  58. # JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003)
  59. ENV JAVA_HOME /usr/lib/jvm/java-1.8.0
  60. #######
  61. # Set env vars for SpotBugs
  62. #######
  63. ENV SPOTBUGS_HOME /opt/spotbugs
  64. #######
  65. # Set env vars for Google Protobuf
  66. #######
  67. ENV PROTOBUF_HOME /opt/protobuf
  68. ENV PATH "${PATH}:/opt/protobuf/bin"
  69. ######
  70. # Install packages
  71. ######
  72. RUN pkg-resolver/install-maven.sh centos:8
  73. RUN pkg-resolver/install-cmake.sh centos:8
  74. RUN pkg-resolver/install-boost.sh centos:8
  75. RUN pkg-resolver/install-spotbugs.sh centos:8
  76. RUN pkg-resolver/install-protobuf.sh centos:8
  77. RUN pkg-resolver/install-zstandard.sh centos:8
  78. RUN pkg-resolver/install-common-pkgs.sh