From 4907577e994f5773984443c84362e8a107164e2a Mon Sep 17 00:00:00 2001 From: EmmyMiao87 <522274284@qq.com> Date: Fri, 22 Feb 2019 14:02:50 +0800 Subject: [PATCH] Copy the latest source code from local in dockerfile (#651) 1. Run git clone may not been executed when docker use cached layer, so I change it to copy latest code from local. 2. Before building docker image, please clone the latest source code firstly. --- docker/Docker_build.md | 9 ++++++++- docker/Dockerfile | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docker/Docker_build.md b/docker/Docker_build.md index 932c5e9c7f..8edcf40a91 100644 --- a/docker/Docker_build.md +++ b/docker/Docker_build.md @@ -1,8 +1,15 @@ ## Doris Develop Environment based on docker +### 0. Download the latest source code + +``` +git clone https://github.com/apache/incubator-doris.git +cp incubator-doris/docker/Dockerfile . + +``` + ### 1. Build docker image ```aidl -cd docker docker build -t doris:v1.0 . diff --git a/docker/Dockerfile b/docker/Dockerfile index c5a690740e..562de6e001 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -97,9 +97,9 @@ WORKDIR ${DEFAULT_DIR} # there is a repo which is included all of thirdparty ENV REPOSITORY_URL=https://doris-incubating-repo.bj.bcebos.com/thirdparty -# clone lastest source code, download and build third party -RUN git clone https://github.com/apache/incubator-doris.git \ - && cd ${DEFAULT_DIR}/incubator-doris && /bin/bash thirdparty/build-thirdparty.sh \ +# clone lastest source code from local dir(please update local dir before docker build), 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 \ && rm -rf ${DEFAULT_DIR}/doris-thirdparty.tar.gz \ && rm -rf ${DEFAULT_DIR}/doris-thirdparty \