Dockerfile 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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 ubuntu:trusty
  19. WORKDIR /root
  20. ######
  21. # Install common dependencies from packages
  22. ######
  23. RUN apt-get update && apt-get install --no-install-recommends -y \
  24. ant \
  25. build-essential \
  26. bzip2 \
  27. cmake \
  28. curl \
  29. doxygen \
  30. fuse \
  31. g++ \
  32. gcc \
  33. git \
  34. gnupg-agent \
  35. make \
  36. maven \
  37. libbz2-dev \
  38. libcurl4-openssl-dev \
  39. libfuse-dev \
  40. libjansson-dev \
  41. libprotobuf-dev \
  42. libprotoc-dev \
  43. libsnappy-dev \
  44. libssl-dev \
  45. libtool \
  46. openjdk-7-jdk \
  47. pinentry-curses \
  48. pkg-config \
  49. protobuf-compiler \
  50. protobuf-c-compiler \
  51. python \
  52. python2.7 \
  53. pylint \
  54. rsync \
  55. snappy \
  56. zlib1g-dev
  57. # Fixing the Apache commons / Maven dependency problem under Ubuntu:
  58. # See http://wiki.apache.org/commons/VfsProblems
  59. RUN cd /usr/share/maven/lib && ln -s ../../java/commons-lang.jar .
  60. #######
  61. # Oracle Java
  62. #######
  63. RUN apt-get install -y software-properties-common
  64. RUN add-apt-repository -y ppa:webupd8team/java
  65. RUN apt-get update
  66. # Auto-accept the Oracle JDK license
  67. RUN echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
  68. RUN apt-get install -y oracle-java7-installer
  69. # Auto-accept the Oracle JDK license
  70. RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
  71. RUN apt-get install -y oracle-java8-installer
  72. ######
  73. # Install findbugs
  74. ######
  75. RUN mkdir -p /opt/findbugs && \
  76. curl -L https://sourceforge.net/projects/findbugs/files/findbugs/3.0.1/findbugs-noUpdateChecks-3.0.1.tar.gz/download \
  77. -o /opt/findbugs.tar.gz && \
  78. tar xzf /opt/findbugs.tar.gz --strip-components 1 -C /opt/findbugs
  79. ENV FINDBUGS_HOME /opt/findbugs
  80. ####
  81. # Install shellcheck
  82. ####
  83. RUN apt-get install -y cabal-install
  84. RUN cabal update && cabal install shellcheck --global
  85. ####
  86. # Install dateutil.parser
  87. ####
  88. RUN pip install python-dateutil
  89. ###
  90. # Avoid out of memory errors in builds
  91. ###
  92. ENV MAVEN_OPTS -Xms256m -Xmx512m
  93. ###
  94. # Everything past this point is either not needed for testing or breaks Yetus.
  95. # So tell Yetus not to read the rest of the file:
  96. # YETUS CUT HERE
  97. ###
  98. ####
  99. # Install Forrest (for Apache Hadoop website)
  100. ###
  101. RUN mkdir -p /usr/local/apache-forrest ; \
  102. curl -O http://archive.apache.org/dist/forrest/0.8/apache-forrest-0.8.tar.gz ; \
  103. tar xzf *forrest* --strip-components 1 -C /usr/local/apache-forrest ; \
  104. echo 'forrest.home=/usr/local/apache-forrest' > build.properties
  105. # Add a welcome message and environment checks.
  106. ADD hadoop_env_checks.sh /root/hadoop_env_checks.sh
  107. RUN chmod 755 /root/hadoop_env_checks.sh
  108. RUN echo '~/hadoop_env_checks.sh' >> /root/.bashrc