From the root of the repo, run following command:
DOCKER_BUILDKIT=1 docker build -t apache/druid:tag -f distribution/docker/Dockerfile .
To build images on Apple M1/M2, you need to follow the instructions in this section.
mvn clean package -DskipTests -Pdist
DOCKER_BUILDKIT=1 docker build -t apache/druid:tag -f distribution/docker/Dockerfile --build-arg BUILD_FROM_SOURCE=false .
distribution/docker/docker-compose.yml file to change the tag of Druid‘s images to the tag that’s used in the ‘Build’ phase above.environment file to suite if necessary.docker compose -f distribution/docker/docker-compose.yml up
This image contains solely the postgres metadata storage connector. If you need the mysql metadata storage connector, you can use Dockerfile.mysql to add it to the base image above.
docker build -t apache/druid:tag-mysql --build-arg DRUID_RELEASE=apache/druid:tag -f distribution/docker/Dockerfile.mysql .
where druid:tag is the version of Druid image to use as the base.