Look at this document: Install Elasticsearch with Dockeredit,
just replace "docker.elastic.co/elasticsearch/elasticsearch" to "hsxsix/elasticsearch-arm64".
For example:
Starting a single node cluster at Raspberry Pi 4 (64bit kernel) with Dockeredit
To start a single-node Elasticsearch cluster for development or testing, specify single-node discovery to bypass the bootstrap checks:
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" hsxsix/elasticsearch-arm64:7.5.1
Delete the JDK in the official elasticsearch package (this jdk is only applicable to x86) and replace it with AdoptOpenJDK-aarch64. The jdk version is unchanged, and it is still 13.0
Add "xpack.ml.enabled: false"" to the elasticsearch.yml during build image. Raspberry Pi and other arm devices do not support this feature. It is enabled by default and elasticsearch will exit with an error
RUN command merge to reduced docker image's layers
Why don't use alpine for the base image, so the image volume is smaller?
Alpine runs jdk relying on glic、no bash by default, useradd、chroot and other commands are quite different from standard commands, the Dockerfile will be great changes, which have not been fully tested and verified.