-
Download the Doris code repo
$ cd /to/your/workspace/ $ git clone https://github.com/apache/incubator-doris.git
You can remove the
.git
dir inincubator-doris/
to make the dir size smaller. So that the following generated docker image can be smaller. -
Copy Dockerfile
$ cd /to/your/workspace/ $ cp incubator-doris/docker/Dockerfile ./
-
Download Oracle JDK(1.8+) RPM
You need to download the Oracle JDK RPM, which can be found here. And rename it to
jdk.rpm
. -
Download nodejs
Download node-v14.8.0-linux-x64.tar.xz, which can be found here.
After preparation, your workspace should like this:
.
├── Dockerfile
├── incubator-doris
│ ├── be
│ ├── bin
│ ├── build.sh
│ ├── conf
│ ├── DISCLAIMER-WIP
│ ├── docker
│ ├── docs
│ ├── env.sh
│ ├── fe
│ ├── ...
├── jdk.rpm
├── node-v14.8.0-linux-x64.tar.xz
$ cd /to/your/workspace/
$ docker build -t doris:v1.0 .
doris
is docker image repository name andv1.0
is tag name, you can change them to whatever you like.
This docker image you just built does not contain Doris source code repo. You need to download it first and map it to the container. (You can just use the one you used to build this image before)
$ docker run -it -v /your/local/path/incubator-doris/:/root/incubator-doris/ doris:v1.0
Then you can build source code inside the container.
$ cd /root/incubator-doris/
$ sh build.sh