Dockerfile and Startup method of elk
This article introduces the relevant knowledge of "elk's dockerfile and startup method". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
DockerFile
FROM kinogmt/centos-ssh
RUN service sshd start
COPY elk.tar / opt/elk.tar
RUN tar-xvf / opt/elk.tar-C / opt
COPY start.sh / opt/start.sh
RUN useradd-g root topnet
RUN echo "topnet" | passwd topnet-- stdin > / dev/null 2 > & 1
RUN chown-R topnet:root / opt
# modify the default number of threads
RUN sed-I "sCompact 1024Compact 65535Compact g" / etc/security/limits.d/90-nproc.conf
# Port
EXPOSE 5601
EXPOSE 9200
EXPOSE 22
EXPOSE 5044
USER topnet
# start es,kibana,logstash
CMD / opt/start.sh
Start.sh
Export JAVA_HOME=/opt/java
Export PATH=$PATH:$JAVA_HOME/bin
Cd / opt/elasticsearch/
Nohup. / bin/elasticsearch &
Cd / opt/kibana
Nohup. / bin/kibana &
Cd / opt/logstash
. / bin/logstash-f config/start.conf-- config.reload.automatic
This is the end of the content of "elk's dockerfile and Startup method". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!