Dockerfile 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. FROM ubuntu:latest
  2. LABEL maintainer="Jeremy Zheng"
  3. ENV DEBIAN_FRONTEND noninteractive
  4. RUN apt update
  5. RUN apt -y upgrade
  6. RUN apt -y install vim locales locales-all tzdata
  7. RUN apt -y autoremove
  8. RUN apt -y clean
  9. RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
  10. RUN locale-gen
  11. RUN update-locale LANG=en_US.UTF-8
  12. RUN update-alternatives --set editor /usr/bin/vim.basic
  13. # https://opensearch.org/downloads.html#opensearch
  14. ENV OPENSEARCH_VERSION "2.17.0"
  15. ENV OPENSEARCH_JAVA_HOME "/opt/opensearch-${OPENSEARCH_VERSION}/jdk"
  16. RUN wget -q -P $HOME/downloads \
  17. https://artifacts.opensearch.org/releases/bundle/opensearch/${OPENSEARCH_VERSION}/opensearch-${OPENSEARCH_VERSION}-linux-arm64.tar.gz
  18. RUN cd /opt && tar xf $HOME/downloads/opensearch-${OPENSEARCH_VERSION}-linux-x64.tar.gz
  19. RUN echo "network.host: 0.0.0.0" >> /opt/opensearch-${OPENSEARCH_VERSION}/config/opensearch.yml
  20. RUN echo "discovery.type: single-node" >> /opt/opensearch-${OPENSEARCH_VERSION}/config/opensearch.yml
  21. RUN echo "plugins.security.disabled: true" >> /opt/opensearch-${OPENSEARCH_VERSION}/config/opensearch.yml
  22. RUN echo "$(date -u +%4Y%m%d%H%M%S)" | tee /VERSION
  23. WORKDIR /opt/opensearch-${OPENSEARCH_VERSION}
  24. CMD ["/opt/opensearch-${OPENSEARCH_VERSION}/bin/opensearch"]