Dockerfile 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. ENV DEBIAN_FRONTEND noninteractive
  21. ENV DEBCONF_TERSE true
  22. ######
  23. # Install common dependencies from packages
  24. #
  25. # WARNING: DO NOT PUT JAVA APPS HERE! Otherwise they will install default
  26. # Ubuntu Java. See Java section below!
  27. ######
  28. RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
  29. build-essential \
  30. bzip2 \
  31. cmake \
  32. curl \
  33. doxygen \
  34. fuse \
  35. g++ \
  36. gcc \
  37. git \
  38. gnupg-agent \
  39. make \
  40. libbz2-dev \
  41. libcurl4-openssl-dev \
  42. libfuse-dev \
  43. libprotobuf-dev \
  44. libprotoc-dev \
  45. libsnappy-dev \
  46. libssl-dev \
  47. libtool \
  48. pinentry-curses \
  49. pkg-config \
  50. protobuf-compiler \
  51. protobuf-c-compiler \
  52. python \
  53. python2.7 \
  54. python-pip \
  55. snappy \
  56. zlib1g-dev
  57. ######
  58. # Install ISA-L library
  59. ######
  60. RUN curl -s -S -L \
  61. http://http.us.debian.org/debian/pool/main/libi/libisal/libisal2_2.15.0-2_amd64.deb \
  62. -o /opt/libisal2_2.15.0-2_amd64.deb && \
  63. dpkg -i /opt/libisal2_2.15.0-2_amd64.deb
  64. #######
  65. # Oracle Java
  66. #######
  67. RUN echo "dot_style = mega" > "/root/.wgetrc"
  68. RUN echo "quiet = on" >> "/root/.wgetrc"
  69. RUN apt-get -q install --no-install-recommends -y software-properties-common
  70. RUN add-apt-repository -y ppa:webupd8team/java
  71. RUN apt-get -q update
  72. # Auto-accept the Oracle JDK license
  73. RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
  74. RUN apt-get -q install --no-install-recommends -y oracle-java8-installer
  75. ####
  76. # Apps that require Java
  77. ###
  78. RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
  79. ant \
  80. maven
  81. # Fixing the Apache commons / Maven dependency problem under Ubuntu:
  82. # See http://wiki.apache.org/commons/VfsProblems
  83. RUN cd /usr/share/maven/lib && ln -s ../../java/commons-lang.jar .
  84. ######
  85. # Install findbugs
  86. ######
  87. RUN mkdir -p /opt/findbugs && \
  88. curl -L -s -S \
  89. https://sourceforge.net/projects/findbugs/files/findbugs/3.0.1/findbugs-noUpdateChecks-3.0.1.tar.gz/download \
  90. -o /opt/findbugs.tar.gz && \
  91. tar xzf /opt/findbugs.tar.gz --strip-components 1 -C /opt/findbugs
  92. ENV FINDBUGS_HOME /opt/findbugs
  93. ####
  94. # Install shellcheck
  95. ####
  96. RUN apt-get -q install -y cabal-install
  97. RUN mkdir /root/.cabal
  98. RUN echo "remote-repo: hackage.fpcomplete.com:http://hackage.fpcomplete.com/" >> /root/.cabal/config
  99. #RUN echo "remote-repo: hackage.haskell.org:http://hackage.haskell.org/" > /root/.cabal/config
  100. RUN echo "remote-repo-cache: /root/.cabal/packages" >> /root/.cabal/config
  101. RUN cabal update
  102. RUN cabal install shellcheck --global
  103. ####
  104. # Install bats
  105. ####
  106. RUN add-apt-repository -y ppa:duggan/bats
  107. RUN apt-get -q update
  108. RUN apt-get -q install --no-install-recommends -y bats
  109. ####
  110. # Install pylint
  111. ####
  112. RUN pip install pylint
  113. ###
  114. # Avoid out of memory errors in builds
  115. ###
  116. ENV MAVEN_OPTS -Xms256m -Xmx512m
  117. ###
  118. # Everything past this point is either not needed for testing or breaks Yetus.
  119. # So tell Yetus not to read the rest of the file:
  120. # YETUS CUT HERE
  121. ###
  122. ####
  123. # Install Forrest (for Apache Hadoop website)
  124. ###
  125. RUN mkdir -p /usr/local/apache-forrest ; \
  126. curl -s -S -O http://archive.apache.org/dist/forrest/0.8/apache-forrest-0.8.tar.gz ; \
  127. tar xzf *forrest* --strip-components 1 -C /usr/local/apache-forrest ; \
  128. echo 'forrest.home=/usr/local/apache-forrest' > build.properties
  129. # Add a welcome message and environment checks.
  130. ADD hadoop_env_checks.sh /root/hadoop_env_checks.sh
  131. RUN chmod 755 /root/hadoop_env_checks.sh
  132. RUN echo '~/hadoop_env_checks.sh' >> /root/.bashrc