SoFunction
Updated on 2025-04-11

How to install doris by docker

Docker installation doris

Here are two common ways to install Apache Doris using Docker:

Method 1: Deploy Doris cluster using Docker Compose

1. Install Docker and Docker Compose

Make sure Docker and Docker Compose are installed. You can check the version by:

docker --version
docker-compose --version

If Docker Compose is not installed, you can install it using the following command:

sudo curl -L "/docker/compose/releases/download/$(curl -s /repos/docker/compose/releases/latest | grep -Po '"tag_name": "\K.*?(?=")')/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

2. Create a `` file

Create a file named `` with the following content:

version: '3'
services:
fe:
image: apachedoris/doris:latest
container_name: doris-fe
ports:
- "8030:8030"
- "9030:9030"
environment:
- CLUSTER_NAME=doris
- FE_HOST=fe
- FE_IP=192.168.1.2
be0:
image: apachedoris/doris:latest
container_name: doris-be0
environment:
- CLUSTER_NAME=doris
- FE_IP=192.168.1.2
- BE_IP=192.168.1.2
- BE_PORT=9030
be1:
image: apachedoris/doris:latest
container_name: doris-be1
environment:
- CLUSTER_NAME=doris
- FE_IP=192.168.1.2
- BE_IP=192.168.1.3
- BE_PORT=9030

Modify the IP address and port according to actual conditions.

3. Start the Doris cluster

Run the following command in the project directory to start the Doris cluster:

docker-compose up -d

4. Visit Doris

  • The browser visits `http://localhost:8030` to view the web interface.
  • Connecting with the MySQL client Doris:
mysql -uroot -P9030 -h127.0.0.1

Method 2: Manual deployment of Doris

1. Pull the Docker image

Pull the Docker image of Apache Doris:

docker pull apachedoris/doris:latest

2. Start the Docker container

Start a Doris container:

docker run -d -it --name=doris --net=host -p 9030:9030 -p 8030:8030 apachedoris/doris:latest /bin/bash

3. Copy the installation package and unzip it

Copy the Doris installation package into the container and unzip:

docker cp apache-doris-2.1. doris:/opt
docker exec -it doris bash
cd /opt/
tar -xvf apache-doris-2.1.

4. Configure and start Doris

Configure Frontend (FE) service:

cd /opt/apache-doris-2.1.7-bin-x64/fe
vi conf/

Modify `priority_networks` to the container intranet IP (can be obtained through `hostname -i`):

priority_networks = 127.0.0.1/24

Start the FE service:

./bin/start_fe.sh --daemon

5. Connect Doris

Connecting with the MySQL client Doris:

/opt/mysql-5.7.22-linux-glibc2.12-x86_64/bin/mysql -uroot -P9030 -h127.0.0.1 --skip-ssl

The above are two common methods of deploying Doris with Docker, and you can choose the appropriate method to deploy according to your needs.

Summarize

Of course, these are just personal experience. I hope you can give you a reference and I hope you can support me more.