Dockerfile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. FROM centos
  17. RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  18. RUN yum install -y sudo python2-pip wget nmap-ncat jq java-1.8.0-openjdk
  19. RUN pip install robotframework
  20. RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64
  21. RUN chmod +x /usr/local/bin/dumb-init
  22. RUN mkdir -p /etc/security/keytabs && chmod -R a+wr /etc/security/keytabs
  23. ADD https://repo.maven.apache.org/maven2/org/jboss/byteman/byteman/4.0.4/byteman-4.0.4.jar /opt/byteman.jar
  24. RUN chmod o+r /opt/byteman.jar
  25. RUN mkdir -p /opt/profiler && \
  26. cd /opt/profiler && \
  27. curl -L https://github.com/jvm-profiling-tools/async-profiler/releases/download/v1.5/async-profiler-1.5-linux-x64.tar.gz | tar xvz
  28. ENV JAVA_HOME=/usr/lib/jvm/jre/
  29. ENV PATH $PATH:/opt/hadoop/bin
  30. RUN groupadd --gid 1000 hadoop
  31. RUN useradd --uid 1000 hadoop --gid 100 --home /opt/hadoop
  32. RUN chmod 755 /opt/hadoop
  33. RUN echo "hadoop ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
  34. RUN chown hadoop /opt
  35. ADD scripts /opt/
  36. ADD scripts/krb5.conf /etc/
  37. RUN yum install -y krb5-workstation
  38. RUN mkdir -p /etc/hadoop && mkdir -p /var/log/hadoop && chmod 1777 /etc/hadoop && chmod 1777 /var/log/hadoop
  39. ENV HADOOP_LOG_DIR=/var/log/hadoop
  40. ENV HADOOP_CONF_DIR=/etc/hadoop
  41. WORKDIR /opt/hadoop
  42. VOLUME /data
  43. USER hadoop
  44. ENTRYPOINT ["/usr/local/bin/dumb-init", "--", "/opt/starter.sh"]