Doris Docker quick build development environment
Related detailed document navigation
- Developing mirror compilation using Docker
(opens new window) - Deploying Doris
(opens new window) - VSCode Be Development Debugging
(opens new window)
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 !!!>
1. FROM apache/incubator-doris:build-env-latest
3. USER root
4. WORKDIR /root
5. RUN echo '<!!! root password !!!>' | passwd root --stdin
7. RUN yum install -y vim net-tools man wget git mysql lsof bash-completion \
8. && cp /var/local/thirdparty/installed/bin/thrift /usr/bin
10. # safer usage, create new user instead of using root
11. RUN yum install -y sudo \
12. && useradd -ms /bin/bash <!!! your user !!!> && echo <!!! your user password !!!> | passwd <!!! your user !!!> --stdin \
13. && usermod -a -G wheel <!!! your user !!!>
15. USER <!!! your user !!!>
16. WORKDIR /home/<!!! your user !!!>
17. RUN git config --global color.ui true \
18. && git config --global user.email "<!!! your git email !!!>" \
19. && git config --global user.name "<!!! your git username !!!>"
21. # install zsh and oh my zsh, easier to use on, you can remove it if you don't need it
22. USER root
23. RUN yum install -y zsh \
24. && chsh -s /bin/zsh <!!! your user !!!>
25. USER <!!! your user !!!>
26. RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh \
27. && git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions \
28. && git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
run build command
1. docker build -t doris .
run image
note! problems with mounting
(opens new window)
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
1. docker run -it doris:latest /bin/bash
if you installed zsh, replace plugins in ~/.zshrc after running the container
1. plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
create directory and download doris
1. su <your user>
2. mkdir code && cd code
3. git clone https://github.com/apache/incubator-doris.git
Compile
Note:
use the following command first time compiling
1. sh build.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
1. sh build.sh
Run
manually create meta_dir metadata storage location, default value is ${DORIS_HOME}/doris-meta
1. mkdir meta_dir
launch FE
1. cd output/fe
2. sh bin/start_fe.sh --daemon
launch BE
1. cd output/be
2. sh bin/start_be.sh --daemon
mysql-client connect
1. mysql -h 127.0.0.1 -P 9030 -u root
