需要的环境
Dockerfile
solr-8.2.0
jdk1.8.0_181
Dockerfile
ADD solr-8.2.0.tar.gz /
ADD jdk1.8.0_181.tar.gz /usr/local/
ENV MYPATH /usr/local
WORKDIR $MYPATH
ENV JAVA_HOME /usr/local/jdk1.8.0_181
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV PATH $PATH:$JAVA_HOME/bin
EXPOSE 8983
EXPOSE 18983
RUN chmod -R 777 /usr/local/jdk1.8.0_181/bin/ && yum -y install lsof curl && ln -s /solr-8.2.0/bin/solr /usr/local/bin/
CMD /solr-8.2.0/bin/solr -e dih -force && tail -f /dev/null