Dockerfile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. WORKDIR /root
  21. # Install dependencies from packages
  22. RUN apt-get update && apt-get install --no-install-recommends -y \
  23. git curl ant make maven \
  24. cmake gcc g++ protobuf-compiler \
  25. build-essential libtool \
  26. zlib1g-dev pkg-config libssl-dev \
  27. snappy libsnappy-dev \
  28. bzip2 libbz2-dev \
  29. libjansson-dev \
  30. fuse libfuse-dev \
  31. libcurl4-openssl-dev \
  32. python python2.7
  33. # Install Forrest
  34. RUN mkdir -p /usr/local/apache-forrest ; \
  35. curl -O http://archive.apache.org/dist/forrest/0.8/apache-forrest-0.8.tar.gz ; \
  36. tar xzf *forrest* --strip-components 1 -C /usr/local/apache-forrest ; \
  37. echo 'forrest.home=/usr/local/apache-forrest' > build.properties
  38. # Install findbugs
  39. RUN mkdir -p /opt/findbugs && \
  40. wget http://sourceforge.net/projects/findbugs/files/findbugs/3.0.1/findbugs-noUpdateChecks-3.0.1.tar.gz/download \
  41. -O /opt/findbugs.tar.gz && \
  42. tar xzf /opt/findbugs.tar.gz --strip-components 1 -C /opt/findbugs
  43. ENV FINDBUGS_HOME /opt/findbugs
  44. # Install shellcheck
  45. RUN apt-get install -y cabal-install
  46. RUN cabal update && cabal install shellcheck --global
  47. # Fixing the Apache commons / Maven dependency problem under Ubuntu:
  48. # See http://wiki.apache.org/commons/VfsProblems
  49. RUN cd /usr/share/maven/lib && ln -s ../../java/commons-lang.jar .
  50. # Avoid out of memory errors in builds
  51. ENV MAVEN_OPTS -Xms256m -Xmx512m
  52. # Add a welcome message and environment checks.
  53. ADD hadoop_env_checks.sh /root/hadoop_env_checks.sh
  54. RUN chmod 755 /root/hadoop_env_checks.sh
  55. RUN echo '~/hadoop_env_checks.sh' >> /root/.bashrc