druid/distribution/docker
Akshat Jain 17215cd677
Remove support for Java 8 (#17466)
All JDK 8 based CI checks have been removed.
    Images used in Dockerfile(s) have been updated to Java 17 based images.
    Documentation has been updated accordingly.
2024-11-21 15:33:08 +05:30
..
Dockerfile Remove support for Java 8 (#17466) 2024-11-21 15:33:08 +05:30
Dockerfile.mariadb support using mariadb connector with mysql extensions (#11402) 2021-07-08 12:25:37 -07:00
Dockerfile.mysql upgrade mysql:mysql-connector-java to 8.2.0 (#16024) 2024-05-06 21:58:37 +08:00
DockerfileBuildTarAdvanced Consolidate the number of Dockerfiles (#11187) 2021-05-07 10:41:34 -07:00
README.md Migrate to use docker compose v2 (#16232) 2024-04-03 12:32:55 +02:00
deduplicate_jars.sh Reduce the size of distribution docker image (#15968) 2024-02-26 21:18:55 +05:30
docker-compose.yml Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
druid.sh Use canonical hostname instead of ip by default (#16386) 2024-05-11 17:53:22 +08:00
environment Do not use cachingCost balancer strategy in Docker environment (#17349) 2024-10-16 20:59:46 +05:30
peon.sh Use canonical hostname instead of ip by default (#16386) 2024-05-11 17:53:22 +08:00

README.md

Build

From the root of the repo, run following command:

DOCKER_BUILDKIT=1 docker build -t apache/druid:tag -f distribution/docker/Dockerfile .

Building images on Apple M1/M2

To build images on Apple M1/M2, you need to follow the instructions in this section.

  1. build Druid distribution from the root of the repo
    mvn clean package -DskipTests -Pdist
    
  2. build target image
    DOCKER_BUILDKIT=1 docker build -t apache/druid:tag -f distribution/docker/Dockerfile --build-arg BUILD_FROM_SOURCE=false .
    

Run

  1. Edit 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.
  2. Edit environment file to suite if necessary.
  3. Run:
    docker compose -f distribution/docker/docker-compose.yml up
    

MySQL Database Connector

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.