FROM centos
LABEL maintainer='1198727509'
RUN dnf install -y openssh-server sudo vim
RUN sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
RUN dnf install -y openssh-clients
RUN echo "root:root" | chpasswd
RUN echo "root ALL=(ALL) ALL" >> /etc/sudoers
RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
RUN mkdir /var/run/sshd
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
ADD jdk-11.0.12_linux-x64_bin.tar.gz /root/
RUN mv /root/jdk-11.0.12 /root/jdk11
ENV JAVA_HOME /root/jdk11
ENV PATH $JAVA_HOME/bin:$PATH
ADD apache-zookeeper-3.7.0-bin.tar.gz /root/
RUN mv /root/apache-zookeeper-3.7.0-bin /root/zookeeper
ENV ZOOKEEPER_HOME /root/zookeeper
ENV PATH $ZOOKEEPER_HOME/bin:$PATH
ADD hadoop-3.3.1.tar.gz /root/
RUN mv /root/hadoop-3.3.1 /root/hadoop
ENV HADOOP_HOME /root/hadoop
ENV PATH $HADOOP_HOME/bin:$HADOOP_HOME/sbin:$PATH