Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ LABEL maintainer=tangxiaoqing214445

ENV DEFAULT_DIR /var/local

# install nodejs
COPY ./node-v14.8.0-linux-x64.tar.xz /tmp/
RUN tar xf /tmp/node-v14.8.0-linux-x64.tar.xz -C ${DEFAULT_DIR}/ \
&& rm /tmp/node-v14.8.0-linux-x64.tar.xz

ENV PATH ${DEFAULT_DIR}/node-v14.8.0-linux-x64/bin:$PATH

ARG GCC_VERSION=7.3.0
ARG GCC_URL=https://mirrors.ustc.edu.cn/gnu/gcc/gcc-${GCC_VERSION}

Expand Down Expand Up @@ -72,13 +79,12 @@ RUN touch ${DEFAULT_DIR}/install_jdk.sh \
ENV JAVA_HOME /usr/java/jdk

# install maven 3.6.3
ARG MAVEN_VERSION=3.6.3
ARG SHA=c35a1803a6e70a126e80b2b3ae33eed961f83ed74d18fcd16909b2d44d7dada3203f1ffe726c17ef8dcca2dcaa9fca676987befeadc9b9f759967a8cb77181c0
ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries
ARG MAVEN_URL=http://mirror.bit.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz

RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
&& curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
&& echo "${SHA} /tmp/apache-maven.tar.gz" | sha512sum -c - \
&& curl -fsSL -o /tmp/apache-maven.tar.gz ${MAVEN_URL} \
&& echo "${SHA} /tmp/apache-maven.tar.gz" | sha512sum -c - \
&& tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \
&& rm -f /tmp/apache-maven.tar.gz \
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
Expand All @@ -89,9 +95,9 @@ ENV MAVEN_HOME /usr/share/maven
WORKDIR ${DEFAULT_DIR}

# there is a repo which is included all of thirdparty
ENV REPOSITORY_URL=https://doris-incubating-repo.bj.bcebos.com/thirdparty
ENV REPOSITORY_URL=https://doris-thirdparty-repo.bj.bcebos.com/thirdparty

# clone lastest source code, download and build thirdparty
# clone lastest source code, download and build third party
COPY incubator-doris ${DEFAULT_DIR}/incubator-doris
RUN cd ${DEFAULT_DIR}/incubator-doris && /bin/bash thirdparty/build-thirdparty.sh \
&& rm -rf ${DEFAULT_DIR}/incubator-doris/thirdparty/src \
Expand Down
17 changes: 13 additions & 4 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,24 @@ under the License.
$ git clone https://github.com/apache/incubator-doris.git
```

1. Copy Dockerfile
You can remove the `.git` dir in `incubator-doris/` to make the dir size smaller.
So that the following generated docker image can be smaller.

2. Copy Dockerfile

```console
$ cd /to/your/workspace/
$ cp incubator-doris/docker/Dockerfile ./
```

1. Download Oracle JDK(1.8+) RPM
3. Download Oracle JDK(1.8+) RPM

You need to download the Oracle JDK RPM, which can be found [here][1].
And rename it to `jdk.rpm`.

4. Download nodejs

You need to download the Oracle JDK RPM, which can be found [here][1]. And
rename it to `jdk.rpm`.
Download node-v14.8.0-linux-x64.tar.xz, which can be found [here][2].

After preparation, your workspace should like this:

Expand All @@ -57,6 +64,7 @@ After preparation, your workspace should like this:
│   ├── fe
│   ├── ...
├── jdk.rpm
├── node-v14.8.0-linux-x64.tar.xz
```

### Build docker image
Expand Down Expand Up @@ -87,3 +95,4 @@ $ sh build.sh
```

[1]: https://www.oracle.com/technetwork/java/javase/downloads/index.html
[2]: https://nodejs.org/dist/v14.8.0/