Forráskód Böngészése

:bug: add arch env support for open-search image

Jeremy Zheng 1 éve
szülő
commit
eefb2be3b3
1 módosított fájl, 5 hozzáadás és 3 törlés
  1. 5 3
      docker/open-search/Dockerfile

+ 5 - 3
docker/open-search/Dockerfile

@@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive
 
 
 RUN apt update
 RUN apt update
 RUN apt -y upgrade
 RUN apt -y upgrade
-RUN apt -y install vim locales locales-all tzdata
+RUN apt -y install wget vim locales locales-all tzdata
 RUN apt -y autoremove
 RUN apt -y autoremove
 RUN apt -y clean
 RUN apt -y clean
 
 
@@ -13,13 +13,15 @@ RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
 RUN locale-gen
 RUN locale-gen
 RUN update-locale LANG=en_US.UTF-8
 RUN update-locale LANG=en_US.UTF-8
 RUN update-alternatives --set editor /usr/bin/vim.basic
 RUN update-alternatives --set editor /usr/bin/vim.basic
+RUN mkdir -p $HOME/downloads
 
 
 # https://opensearch.org/downloads.html#opensearch
 # https://opensearch.org/downloads.html#opensearch
 ENV OPENSEARCH_VERSION "2.17.0"
 ENV OPENSEARCH_VERSION "2.17.0"
+ENV OPENSEARCH_ARCH "arm64"
 ENV OPENSEARCH_JAVA_HOME "/opt/opensearch-${OPENSEARCH_VERSION}/jdk"
 ENV OPENSEARCH_JAVA_HOME "/opt/opensearch-${OPENSEARCH_VERSION}/jdk"
 RUN wget -q -P $HOME/downloads \
 RUN wget -q -P $HOME/downloads \
-    https://artifacts.opensearch.org/releases/bundle/opensearch/${OPENSEARCH_VERSION}/opensearch-${OPENSEARCH_VERSION}-linux-arm64.tar.gz
-RUN cd /opt && tar xf $HOME/downloads/opensearch-${OPENSEARCH_VERSION}-linux-x64.tar.gz 
+    https://artifacts.opensearch.org/releases/bundle/opensearch/${OPENSEARCH_VERSION}/opensearch-${OPENSEARCH_VERSION}-linux-${OPENSEARCH_ARCH}.tar.gz
+RUN cd /opt && tar xf $HOME/downloads/opensearch-${OPENSEARCH_VERSION}-linux-${OPENSEARCH_ARCH}.tar.gz 
 RUN echo "network.host: 0.0.0.0" >> /opt/opensearch-${OPENSEARCH_VERSION}/config/opensearch.yml
 RUN echo "network.host: 0.0.0.0" >> /opt/opensearch-${OPENSEARCH_VERSION}/config/opensearch.yml
 RUN echo "discovery.type: single-node" >> /opt/opensearch-${OPENSEARCH_VERSION}/config/opensearch.yml 
 RUN echo "discovery.type: single-node" >> /opt/opensearch-${OPENSEARCH_VERSION}/config/opensearch.yml 
 RUN echo "plugins.security.disabled: true" >> /opt/opensearch-${OPENSEARCH_VERSION}/config/opensearch.yml
 RUN echo "plugins.security.disabled: true" >> /opt/opensearch-${OPENSEARCH_VERSION}/config/opensearch.yml