Docker安装Doris

Doris官网

安装Docker

参考文档

宿主机准备

创建挂载文件夹

mkdir /home/doris

需在宿主机执行如下命令

sysctl -w vm.max_map_count=2000000

安装FE

docker run -itd \
--name=doris-fe \
--env FE_SERVERS="fe1:192.168.123.168:9010" \
--env FE_ID=1 \
--network=host \
-v /home/doris/fe/doris-meta:/opt/apache-doris/fe/doris-meta \
-v /home/doris/fe/conf:/opt/apache-doris/fe/conf \
-v /home/doris/fe/log:/opt/apache-doris/fe/log \
-v /etc/localtime:/etc/localtime:ro \
apache/doris:1.2.2-fe-x86_64

安装BE

docker run -itd \
--name=doris-be \
--env FE_SERVERS="fe1:192.168.123.168:9010" \
--env BE_ADDR="192.168.123.168:9050" \
--network=host \
-v /home/doris/be/storage:/opt/apache-doris/be/storage \
-v /home/doris/be/conf:/opt/apache-doris/be/conf \
-v /home/doris/be/log:/opt/apache-doris/be/log \
-v /etc/localtime:/etc/localtime:ro \
apache/doris:1.2.2-be-x86_64

常见问题

  1. 宿主机重启,无法启动doris
    执行命令 sysctl -w vm.max_map_count=2000000
  2. 由于Full GC导致BE无法正常启动
    需要在启动BE容器后,进入容器内
docker exec -it doris-be bash

cd /opt/apache-doris/be/bin && ./start_be.sh

按下 ctrl + p + q,退出容器