Dockerfile 3.1 KB

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