kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From granthe...@apache.org
Subject [kudu] 02/02: KUDU-2849 Docker image for python kudu client
Date Wed, 07 Aug 2019 23:37:33 GMT
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 00c60a2de9a652233b2f5fbbcfd5d14ede326b88
Author: SandishKuamrHN <sanysandish@gmail.com>
AuthorDate: Sun Aug 4 19:25:18 2019 -0700

    KUDU-2849 Docker image for python kudu client
    
    A base image that has all the development libraries required
    to run Python Kudu Client.
    
    Building Python Kudu Client Image:
    Set Env
    export TARGETS=kudu-python
    ./docker/docker-build.sh
    
    Run docker kudu python client:
    docker run --name kudu-python -it apache/kudu:kudu-python-latest
    
    Change-Id: Ia7cab8ffe114c73752c261f27ebc7a58e4b57a6e
    Reviewed-on: http://gerrit.cloudera.org:8080/14000
    Tested-by: Kudu Jenkins
    Reviewed-by: Grant Henke <granthenke@apache.org>
---
 docker/Dockerfile  | 37 +++++++++++++++++++++++++++++++++++++
 docker/README.adoc |  3 +++
 2 files changed, 40 insertions(+)

diff --git a/docker/Dockerfile b/docker/Dockerfile
index 7e99ee5..7ece98b 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -218,6 +218,43 @@ LABEL name="Apache Kudu Build" \
       org.label-schema.version=$VERSION
 
 #
+# ---- Kudu Python ----
+# Builds a runtime image with the Kudu python client pre-installed.
+#
+FROM dev AS kudu-python
+
+ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64
+WORKDIR $INSTALL_DIR/python
+# Copy the requirements file.
+COPY ./python/requirements.txt requirements.txt
+COPY --from=build /usr/local /usr/local/
+COPY --from=build /kudu/python/dist/kudu-python-*.tar.gz .
+RUN pip install -r requirements.txt \
+    && rm -rf requirements.txt \
+    && pip install kudu-python-*.tar.gz \
+    && rm -rf kudu-python-*.tar.gz
+
+ARG DOCKERFILE
+ARG MAINTAINER
+ARG URL
+ARG VCS_TYPE
+ARG VCS_URL
+ARG VERSION
+
+LABEL org.label-schema.name="Apache Kudu Python Client Base" \
+      org.label-schema.description="Builds a runtime image with the Kudu python client pre-installed."
\
+      # Common labels.
+      org.label-schema.dockerfile=$DOCKERFILE \
+      org.label-schema.maintainer=$MAINTAINER \
+      org.label-schema.url=$URL \
+      org.label-schema.vcs-type=$VCS_TYPE \
+      org.label-schema.vcs-url=$VCS_URL \
+      org.label-schema.version=$VERSION
+
+# Entry point to the python.
+CMD ["python"]
+
+#
 # ---- Kudu ----
 # Builds a runtime image with the Kudu binaries pre-installed.
 #
diff --git a/docker/README.adoc b/docker/README.adoc
index 1e9076e..4b8997e 100644
--- a/docker/README.adoc
+++ b/docker/README.adoc
@@ -107,6 +107,9 @@ A base image that has all the development libraries for Kudu pre-installed.
 === apache/kudu:runtime-[OS]-[VERSION]
 A base image that has all the runtime libraries for Kudu pre-installed.
 
+=== apache/kudu:kudu-python-[VERSION]
+Builds a runtime image with the Kudu python client pre-installed.
+
 == Tips and Troubleshooting
 
 === Ensure enough resources are allocated to docker


Mime
View raw message