Skip to content
Back to Insights
Data EngineeringBy KE Engineering Team

Druid on Apple Silicon

Druid on Apple SiliconDATA ENGINEERING cover for Druid on Apple SiliconpodsDATA ENGINEERINGDruid on Apple Silicon// ARM64 · APPLE SILICON

First written September 2022, last updated September 2026.

The published Apache Druid container on Docker Hub is a linux/amd64-only image. Running this on Apple silicon is slow.

Fortunately, it is easy to build your own using the binary distribution and the existing druid.sh.

All of this is available in a Dockerfile and build script in the druid-m1 repository. The build.sh builds an arm64 image based on the version to be downloaded in the Dockerfile.

A linux/amd64 container-based deployment of Apache Druid on Apple M1 silicon takes 2 minutes (1:58.58 - tested on an Apple M1 Max with 64GB memory and 32GB allocated) to start and become available for processing. An image built from linux/arm64 base images takes only 18 seconds (0:17.79) to become available.

If you just need an arm64/v8 image, download the druid-m1 project and run the build.sh script. Want to know a little about how it was put together? Continue on.

Updates

Updated to support Druid 30. The container is now based on a Java 17 image. The distribution layout also changed, which required further updates. The result aligns closely with Druid’s standard Dockerfile.

Image

The process of creating this image isn’t complicated. Three major pieces went into its creation.

OS Architecture

First find and use containers that have an arm64/v8 image. Both “openjdk:17-slim-bullseye” and “busybox” have arm64/v8 images.

Docker Hub page for the openjdk 17 image listing its supported architectures, including arm64/v8
Fig. 1: Docker Container Image for OpenJDK 17

Software Installation

The Dockerfile downloads and installs Druid, and uses the druid.sh maintained by Apache Druid.

dockerfile
ARG DRUID_VERSION=30.0.1ADD https://archive.apache.org/dist/druid/${DRUID_VERSION}/apache-druid-${DRUID_VERSION}-bin.tar.gz /tmpADD https://raw.githubusercontent.com/apache/druid/${DRUID_VERSION}/distribution/docker/druid.sh /druid.sh

Druid Extensions

Druid extensions are added by the pull-deps operation available with Druid. For this build, the kafka-emitter extension is included, but others are easy to add.

dockerfile
RUN \	java -cp "/opt/druid/lib/*" \		-Ddruid.extensions.directory="/opt/druid/extensions/" \		-Ddruid.extensions.hadoopDependenciesDir="/opt/druid/hadoop-dependencies/" \		org.apache.druid.cli.Main tools pull-deps --no-default-hadoop \		-c "org.apache.druid.extensions.contrib:kafka-emitter"

Why The Difference?

The Dockerfile that is part of Apache Druid builds the software from source. Since this image is built after a release, this approach uses the fact that the binaries are available for download.

New To Druid?

If you are new to Druid and want to see what it can do, check out the druid-late demonstration within dev-local-demos. It uses a container-based toolkit provided at dev-local. Update the .env file within the druid folder to point to your individually built arm64 image.

Working on something like this?

Start a Conversation