1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- # Licensed to the Apache Software Foundation (ASF) under one
- # or more contributor license agreements. See the NOTICE file
- # distributed with this work for additional information
- # regarding copyright ownership. The ASF licenses this file
- # to you under the Apache License, Version 2.0 (the
- # "License"); you may not use this file except in compliance
- # with the License. You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- FROM centos
- RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- RUN yum install -y sudo python2-pip wget nmap-ncat jq java-1.8.0-openjdk
- RUN pip install robotframework
- 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
- RUN chmod +x /usr/local/bin/dumb-init
- RUN mkdir -p /etc/security/keytabs && chmod -R a+wr /etc/security/keytabs
- ADD https://repo.maven.apache.org/maven2/org/jboss/byteman/byteman/4.0.4/byteman-4.0.4.jar /opt/byteman.jar
- RUN chmod o+r /opt/byteman.jar
- RUN mkdir -p /opt/profiler && \
- cd /opt/profiler && \
- curl -L https://github.com/jvm-profiling-tools/async-profiler/releases/download/v1.5/async-profiler-1.5-linux-x64.tar.gz | tar xvz
- ENV JAVA_HOME=/usr/lib/jvm/jre/
- ENV PATH $PATH:/opt/hadoop/bin
- RUN groupadd --gid 1000 hadoop
- RUN useradd --uid 1000 hadoop --gid 100 --home /opt/hadoop
- RUN chmod 755 /opt/hadoop
- RUN echo "hadoop ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
- RUN chown hadoop /opt
- ADD scripts /opt/
- ADD scripts/krb5.conf /etc/
- RUN yum install -y krb5-workstation
- RUN mkdir -p /etc/hadoop && mkdir -p /var/log/hadoop && chmod 1777 /etc/hadoop && chmod 1777 /var/log/hadoop
- ENV HADOOP_LOG_DIR=/var/log/hadoop
- ENV HADOOP_CONF_DIR=/etc/hadoop
- WORKDIR /opt/hadoop
- VOLUME /data
- USER hadoop
- ENTRYPOINT ["/usr/local/bin/dumb-init", "--", "/opt/starter.sh"]
|