Skip to main content
Skip to main content

Doris Docker quick build development environment

Doris Docker quick build development environment

Environment preparation​

  • Install Docker
  • VSCode
    • Remote plugin

Build image​

create dockerfile

VSCode replace all by using Ctrl-d

  • <!!! your user !!!>
  • <!!! your user password !!!>
  • <!!! root password !!!>
  • <!!! your git email !!!>
  • <!!! your git username !!!>
FROM apache/incubator-doris:build-env-latest

USER root
RUN echo '<!!! root password !!!>' | passwd root --stdin

RUN yum install -y vim net-tools man wget git mysql lsof bash-completion \
&& cp /var/local/thirdparty/installed/bin/thrift /usr/bin

# safer usage, create new user instead of using root
RUN yum install -y sudo \
&& useradd -ms /bin/bash <!!! your user !!!> && echo <!!! your user password !!!> | passwd <!!! your user !!!> --stdin \
&& usermod -a -G wheel <!!! your user !!!>

USER <!!! your user !!!>
WORKDIR /home/<!!! your user !!!>
RUN git config --global color.ui true \
&& git config --global "<!!! your git email !!!>" \
&& git config --global "<!!! your git username !!!>"

# install zsh and oh my zsh, easier to use on, you can remove it if you don't need it
USER root
RUN yum install -y zsh \
&& chsh -s /bin/zsh <!!! your user !!!>
USER <!!! your user !!!>
RUN wget -O - | zsh \
&& git clone ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions \
&& git clone ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

run build command

docker build -t doris .

run image

note! problems with mounting

See the link above: It is recommended to run the image by mounting the local Doris source code directory as a volume .....

if you are developing on windows, mounting may cause cross-filesystem access problems, please consider setting it manually

--cap-add SYS_PTRACE parameter allows dockers to use ptrace, making it easier for us to use ptrace and gdb remote debugging functions.

docker run -it --cap-add SYS_PTRACE doris:latest /bin/bash

if you installed zsh, replace plugins in ~/.zshrc after running the container

plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

create directory and download doris

su <your user>
mkdir code && cd code
git clone
cd doris
git submodule update --init --recursive



use the following command first time compiling

sh --clean --be --fe --ui

it is because build-env-for-0.15.0 version image upgraded thrift(0.9 -> 0.13), so you need to use --clean command to force use new version of thrift to generate code files, otherwise it will cause incompatibilities.

compile Doris



manually create meta_dir metadata storage location, default value is ${DORIS_HOME}/doris-meta

mkdir meta_dir

launch FE

cd output/fe
sh bin/ --daemon

launch BE

cd output/be
sh bin/ --daemon

mysql-client connect

mysql -h -P 9030 -u root