Dockerfile 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 dockerfile/java:openjdk-7-jdk
  19. # FROM dockerfile/java:oracle-java7
  20. FROM ubuntu:trusty
  21. WORKDIR /root
  22. RUN apt-get install -y software-properties-common
  23. RUN add-apt-repository -y ppa:webupd8team/java
  24. RUN apt-get update
  25. # Auto-accept the Oracle JDK license
  26. RUN echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
  27. RUN apt-get install -y oracle-java7-installer
  28. # Install dependencies from packages
  29. RUN apt-get update && apt-get install --no-install-recommends -y \
  30. git curl ant make maven \
  31. cmake gcc g++ protobuf-compiler \
  32. build-essential libtool \
  33. zlib1g-dev pkg-config libssl-dev \
  34. snappy libsnappy-dev \
  35. bzip2 libbz2-dev \
  36. libjansson-dev \
  37. fuse libfuse-dev \
  38. libcurl4-openssl-dev \
  39. python python2.7
  40. # Install Forrest
  41. RUN mkdir -p /usr/local/apache-forrest ; \
  42. curl -O http://archive.apache.org/dist/forrest/0.8/apache-forrest-0.8.tar.gz ; \
  43. tar xzf *forrest* --strip-components 1 -C /usr/local/apache-forrest ; \
  44. echo 'forrest.home=/usr/local/apache-forrest' > build.properties
  45. # Install findbugs
  46. RUN mkdir -p /opt/findbugs && \
  47. wget http://sourceforge.net/projects/findbugs/files/findbugs/3.0.1/findbugs-noUpdateChecks-3.0.1.tar.gz/download \
  48. -O /opt/findbugs.tar.gz && \
  49. tar xzf /opt/findbugs.tar.gz --strip-components 1 -C /opt/findbugs
  50. ENV FINDBUGS_HOME /opt/findbugs
  51. # Install shellcheck
  52. RUN apt-get install -y cabal-install
  53. RUN cabal update && cabal install shellcheck --global
  54. #####
  55. # bats
  56. #####
  57. RUN add-apt-repository ppa:duggan/bats --yes
  58. RUN apt-get update -qq
  59. RUN apt-get install -qq bats
  60. # Fixing the Apache commons / Maven dependency problem under Ubuntu:
  61. # See http://wiki.apache.org/commons/VfsProblems
  62. RUN cd /usr/share/maven/lib && ln -s ../../java/commons-lang.jar .
  63. # Avoid out of memory errors in builds
  64. ENV MAVEN_OPTS -Xms256m -Xmx512m
  65. # Add a welcome message and environment checks.
  66. ADD hadoop_env_checks.sh /root/hadoop_env_checks.sh
  67. RUN chmod 755 /root/hadoop_env_checks.sh
  68. RUN echo '~/hadoop_env_checks.sh' >> /root/.bashrc