2019-02-08 07:12:28 -05:00
|
|
|
<!--
|
|
|
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
~ or more contributor license agreements. See the NOTICE file
|
|
|
|
~ distributed with this work for additional information
|
|
|
|
~ regarding copyright ownership. The ASF licenses this file
|
|
|
|
~ to you under the Apache License, Version 2.0 (the
|
|
|
|
~ "License"); you may not use this file except in compliance
|
|
|
|
~ with the License. You may obtain a copy of the License at
|
|
|
|
~
|
|
|
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
~
|
|
|
|
~ Unless required by applicable law or agreed to in writing,
|
|
|
|
~ software distributed under the License is distributed on an
|
|
|
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
~ KIND, either express or implied. See the License for the
|
|
|
|
~ specific language governing permissions and limitations
|
|
|
|
~ under the License.
|
|
|
|
-->
|
|
|
|
|
|
|
|
## Build
|
|
|
|
|
2022-09-15 21:25:52 -04:00
|
|
|
From the root of the repo, run following command:
|
2019-02-08 07:12:28 -05:00
|
|
|
|
2022-09-15 21:25:52 -04:00
|
|
|
```bash
|
|
|
|
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.
|
2019-02-08 07:12:28 -05:00
|
|
|
|
2022-09-15 21:25:52 -04:00
|
|
|
1. build Druid distribution from the root of the repo
|
|
|
|
```bash
|
|
|
|
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 .
|
|
|
|
```
|
2019-03-20 11:33:28 -04:00
|
|
|
|
2022-09-15 21:25:52 -04:00
|
|
|
## Run
|
2020-02-14 00:24:45 -05:00
|
|
|
|
2022-09-15 21:25:52 -04:00
|
|
|
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:
|
|
|
|
```bash
|
2024-04-03 06:32:55 -04:00
|
|
|
docker compose -f distribution/docker/docker-compose.yml up
|
2022-09-15 21:25:52 -04:00
|
|
|
```
|
2020-02-14 00:24:45 -05:00
|
|
|
|
2019-08-06 11:32:59 -04:00
|
|
|
## MySQL Database Connector
|
2019-03-20 11:33:28 -04:00
|
|
|
|
2019-08-13 11:33:06 -04:00
|
|
|
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.
|
2019-03-20 11:33:28 -04:00
|
|
|
|
2022-09-15 21:25:52 -04:00
|
|
|
```bash
|
|
|
|
docker build -t apache/druid:tag-mysql --build-arg DRUID_RELEASE=apache/druid:tag -f distribution/docker/Dockerfile.mysql .
|
|
|
|
```
|
2019-03-20 11:33:28 -04:00
|
|
|
|
2022-09-15 21:25:52 -04:00
|
|
|
where `druid:tag` is the version of Druid image to use as the base.
|