Score:0

how having Opensearch and openserach dashboard in same docker file

eg flag

My final goal is to have opensearch and opensearch-dashboard on same unix server without docker But in first time i need to test them in uniq dockerFiles I have tried without succes

FROM centos:centos7.9.2009
MAINTAINER me

RUN echo "vm.max_map_count = 262144" >> /etc/sysctl.conf
RUN echo 'echo 262144 > /proc/sys/vm/max_map_count'>/etc/rc.local 

RUN echo "fs.file-max=70000" >> /etc/sysctl.conf
RUN echo "* hard nofile 65536" >> /etc/security/limits.conf

#ajout user
RUN adduser user
 
# setup Java
RUN mkdir /opt/java
ENV JAVA_HOME=/opt/java/jdk-17.0.2
ENV OPENSEARCH_JAVA_OPTS='-Xms512m -Xmx512m'

 
ADD openjdk-17.0.2_linux-x64_bin.tar.gz /opt/java
 
# setup environment variables
RUN update-alternatives --install /usr/bin/javac javac /opt/java/jdk-17.0.2/bin/javac 100
RUN update-alternatives --install /usr/bin/java java /opt/java/jdk-17.0.2/bin/java 100
RUN update-alternatives --display java

RUN mkdir /opt/opensearch
WORKDIR /opt/opensearch/
ADD launch.sh /opt/opensearch/
ENV OPENSEARCH_JAVA_HOME=/opt/java/jdk-17.0.2
ADD opensearch-1.3.1-linux-x64.tar.gz /opt/opensearch/

# ---- opensearch.yml
#plugins.security.disabled: true
COPY opensearch.yml ./opensearch-1.3.1/config/


# opensearch remplace le moteur ELK
EXPOSE 9200
EXPOSE 9300
EXPOSE 9600

# opensearch-dashboard remplace kibana
ADD opensearch-dashboards-1.3.1-linux-x64.tar.gz /opt/opensearch/

#---- opensearch_dashboards.yml
#server.ssl.enabled: false
#server.host: "0"
#opensearch.hosts: http://localhost:9200
#opensearch.username: "admin" # Default username on the docker image
#opensearch.password: "admin" # Default password on the docker image
#opensearch.ssl.verificationMode: none
#logging.dest: stdout
#logging.verbose: true
COPY opensearch_dashboards.yml ./opensearch-dashboards-1.3.1/config/
EXPOSE 5601


VOLUME /opt/opensearch/opensearch-dashboards-1.3.1/data
VOLUME /opt/opensearch/opensearch-dashboards-1.3.1/config
VOLUME /tmp
WORKDIR /tmp/

#launch.sh
##/opt/opensearch/opensearch-1.3.1/bin/opensearch &
##/opt/opensearch/opensearch-dashboards-1.3.1/bin/opensearch-dashboards
CMD ["sh","-c","su - user -c '/opt/opensearch/launch.sh'"]


#--- start
#docker build -t i1 .
#docker run -p 9200:9200 -p 9300:9300 -p 9600:9600 -p 5601:5601  -e "discovery.type=single-node" -d --name c1 i1
##http://localhost:5601/app/login?nextUrl=%2F

I could connect en 9200 port with btr But when i tried user admin/admin in 5601 form login failed ! Where is my mistake ? Regards

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.