Skip to content

Instantly share code, notes, and snippets.

@chapinb
Created January 2, 2020 02:24
Show Gist options
  • Save chapinb/e5ab89bc9fe7e827743688d242d2b14c to your computer and use it in GitHub Desktop.
Save chapinb/e5ab89bc9fe7e827743688d242d2b14c to your computer and use it in GitHub Desktop.
Elasticsearch 7.5.1 for ARMHF / Raspberry Pi

Elasticsearch for ARMHF / Raspberry Pi

This gist includes resources to set up your own Elasticsearch container on Docker running on an Raspberry Pi.

Setup

  1. Download all three files in this gist to the same folder
  2. chmod +x docker-entrypoint.sh
  3. docker build -t elastic-armhf:7.5.1 .
  4. docker container run -d -p 9200:9200 --name elastic-1 --restart always elastic-armhf:7.5.1
server {
listen 9200;
listen [::]:9200;
location / {
proxy_pass http://localhost:9292/;
}
}
#!/bin/bash
service nginx start
/opt/elasticsearch-7.5.1/bin/elasticsearch
FROM adoptopenjdk/openjdk11:slim
RUN apt update &&\
apt install -y curl nginx
# SETUP NGINX PROXY
COPY default.nginx.conf /etc/nginx/sites-available/default
# SETUP ELASTIC 7.5.1
WORKDIR /opt
RUN curl -o elastic.tar.gz https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-no-jdk-linux-x86_64.tar.gz && \
tar zxvf elastic.tar.gz && \
rm elastic.tar.gz
WORKDIR /opt/elasticsearch-7.5.1
# UPDATE CONFIG
RUN echo "http.port: 9292" >> config/elasticsearch.yml
RUN echo "network.host: 127.0.0.1" >> config/elasticsearch.yml
RUN echo "xpack.ml.enabled: false" >> config/elasticsearch.yml
COPY docker-entrypoint.sh /opt/
ENTRYPOINT ["/opt/docker-entrypoint.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment