This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit e18f32f46a3c27e269346b47f48c30033f69382f
Author: Grant Henke <[email protected]>
AuthorDate: Mon Mar 9 09:39:29 2020 -0500

    [docker] Fix docker build
    
    This patch fixes the docker build by moving the `java` directory
    `COPY` above the C++ build. This is neccessary now that the
    subprocessor depends on the Java build.
    
    I also added a missing label, `vcs-ref`, back to the kudu-python
    image and made the kudu-python image a default target given
    we want to publish it with each release.
    
    Change-Id: Ifbf32dc0c803b3a1ab44724d45dd1e64728d6133
    Reviewed-on: http://gerrit.cloudera.org:8080/15388
    Tested-by: Kudu Jenkins
    Reviewed-by: Alexey Serbin <[email protected]>
---
 docker/Dockerfile              | 14 +++++++++-----
 docker/bootstrap-python-env.sh |  2 +-
 docker/docker-build.sh         |  2 +-
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/docker/Dockerfile b/docker/Dockerfile
index 444dd32..fe4b3ac 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -137,8 +137,8 @@ LABEL name="Apache Kudu Thirdparty" \
 #
 # ---- Build ----
 # Builds an image that has the Kudu source code pre-built.
-# This is useful for generating a runtime image, but can also be a
-# useful base development image.
+# This is useful for generating a small runtime image,
+# but can also be a useful base development image.
 #
 FROM thirdparty AS build
 
@@ -159,9 +159,13 @@ COPY ./build-support build-support
 COPY ./docs/support docs/support
 COPY ./cmake_modules cmake_modules
 COPY ./examples/cpp examples/cpp
-COPY ./java/kudu-hive/ java/kudu-hive/
 COPY ./src src
 COPY ./CMakeLists.txt ./version.txt ./
+
+# Copy the java build source.
+# Some parts of the C++ build depend on Java code.
+COPY ./java /kudu/java
+
 # Build the c++ code.
 WORKDIR /kudu/build/$BUILD_TYPE
 # Ensure we don't rebuild thirdparty. Instead let docker handle caching.
@@ -183,8 +187,6 @@ RUN ../../build-support/enable_devtoolset.sh \
   # Strip the client libraries to reduce the images size
   && if [[ "$STRIP" == "1" ]]; then find "/usr/local" -name "libkudu*" -type f 
-exec strip {} \;; fi
 
-# Copy the java build source.
-COPY ./java /kudu/java
 # Build the java code.
 WORKDIR /kudu/java
 RUN ./gradlew jar
@@ -248,6 +250,7 @@ RUN pip install -r requirements.txt \
 ARG DOCKERFILE
 ARG MAINTAINER
 ARG URL
+ARG VCS_REF
 ARG VCS_TYPE
 ARG VCS_URL
 ARG VERSION
@@ -258,6 +261,7 @@ LABEL org.label-schema.name="Apache Kudu Python Client" \
       org.label-schema.dockerfile=$DOCKERFILE \
       org.label-schema.maintainer=$MAINTAINER \
       org.label-schema.url=$URL \
+      org.label-schema.vcs-ref=$VCS_REF \
       org.label-schema.vcs-type=$VCS_TYPE \
       org.label-schema.vcs-url=$VCS_URL \
       org.label-schema.version=$VERSION
diff --git a/docker/bootstrap-python-env.sh b/docker/bootstrap-python-env.sh
index ac7f14b..f1f1c29 100755
--- a/docker/bootstrap-python-env.sh
+++ b/docker/bootstrap-python-env.sh
@@ -18,7 +18,7 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-# This script handles bootstrapping a base OS for
+# This script handles bootstrapping python for
 # the Apache Kudu base docker images.
 #
 ##########################################################
diff --git a/docker/docker-build.sh b/docker/docker-build.sh
index 2e5c9c6..f7ada2c 100755
--- a/docker/docker-build.sh
+++ b/docker/docker-build.sh
@@ -97,7 +97,7 @@ ROOT=$(cd $(dirname "$BASH_SOURCE")/.. ; pwd)
 #   ubuntu:bionic
 DEFAULT_OS="ubuntu:xenial"
 BASES=${BASES:="$DEFAULT_OS"}
-TARGETS=${TARGETS:="kudu"}
+TARGETS=${TARGETS:="kudu,kudu-python"}
 REPOSITORY=${REPOSITORY:="apache/kudu"}
 PUBLISH=${PUBLISH:=0}
 TAG_LATEST=${TAG_LATEST:=1}

Reply via email to