Created
June 20, 2017 08:34
-
-
Save xkrt/6734ddc96846e7eaf71eb3a6e17e428d to your computer and use it in GitHub Desktop.
Dockerfile for Kudu 1.4.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:7 | |
ARG KUDU_VERSION=1.4.0 | |
RUN yum install -y wget | |
RUN echo "Downloading kudu-${KUDU_VERSION}..." && \ | |
wget "http://www.apache.org/closer.cgi?filename=kudu/${KUDU_VERSION}/apache-kudu-${KUDU_VERSION}.tar.gz&action=download" -O /tmp/apache-kudu-${KUDU_VERSION}.tar.gz && \ | |
cd /tmp && \ | |
tar xzf apache-kudu-${KUDU_VERSION}.tar.gz && \ | |
rm apache-kudu-${KUDU_VERSION}.tar.gz | |
RUN echo "Install build tools..." && \ | |
yum install -y \ | |
autoconf automake cyrus-sasl-devel cyrus-sasl-gssapi \ | |
cyrus-sasl-plain gcc gcc-c++ gdb git krb5-server krb5-workstation libtool \ | |
make openssl-devel patch pkgconfig redhat-lsb-core rsync unzip vim-common which | |
RUN echo "Build any missing third-party requirements..." && \ | |
cd /tmp/apache-kudu-${KUDU_VERSION} && \ | |
build-support/enable_devtoolset.sh thirdparty/build-if-necessary.sh && \ | |
echo "Build Kudu..." && \ | |
mkdir -p build/release && \ | |
cd build/release && \ | |
../../build-support/enable_devtoolset.sh \ | |
../../thirdparty/installed/common/bin/cmake \ | |
-DCMAKE_BUILD_TYPE=release \ | |
../.. && \ | |
make -j4 && \ | |
echo "Install Kudu binaries..." && \ | |
cd /tmp/apache-kudu-${KUDU_VERSION}/build/release && \ | |
make DESTDIR=/opt/kudu install && \ | |
echo "Remove sources..." && \ | |
rm -r /tmp/apache-kudu-${KUDU_VERSION} && \ | |
echo "Uninstall build tools..." && \ | |
yum remove -y \ | |
autoconf automake cyrus-sasl-devel \ | |
gcc gcc-c++ gdb git libtool \ | |
make openssl-devel patch rsync unzip vim-common which |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker build -t kudu-build . | |
$ docker run -it --rm kudu-build ls /opt/kudu/usr/local | |
include lib64 share |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment