"Fossies" - the Fresh Open Source Software Archive

Member "apache-pulsar-2.6.0/pulsar-client-cpp/docker/Dockerfile" (9 Jun 2020, 6110 Bytes) of package /linux/misc/apache-pulsar-2.6.0-src.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Dockerfile": 2.5.0_vs_2.5.1.

    1 #
    2 # Licensed to the Apache Software Foundation (ASF) under one
    3 # or more contributor license agreements.  See the NOTICE file
    4 # distributed with this work for additional information
    5 # regarding copyright ownership.  The ASF licenses this file
    6 # to you under the Apache License, Version 2.0 (the
    7 # "License"); you may not use this file except in compliance
    8 # with the License.  You may obtain a copy of the License at
    9 #
   10 #   http://www.apache.org/licenses/LICENSE-2.0
   11 #
   12 # Unless required by applicable law or agreed to in writing,
   13 # software distributed under the License is distributed on an
   14 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   15 # KIND, either express or implied.  See the License for the
   16 # specific language governing permissions and limitations
   17 # under the License.
   18 #
   19 
   20 
   21 FROM quay.io/pypa/manylinux1_x86_64
   22 
   23 RUN yum install -y gtest-devel
   24 
   25 ARG PYTHON_VERSION
   26 ARG PYTHON_SPEC
   27 
   28 ENV PYTHON_VERSION=${PYTHON_VERSION}
   29 ENV PYTHON_SPEC=${PYTHON_SPEC}
   30 
   31 ENV PATH="/opt/python/${PYTHON_SPEC}/bin:${PATH}"
   32 
   33 RUN ln -s /opt/python/${PYTHON_SPEC}/include/python${PYTHON_VERSION}m /opt/python/${PYTHON_SPEC}/include/python${PYTHON_VERSION}
   34 
   35 # Perl (required for building OpenSSL)
   36 RUN curl -O -L https://www.cpan.org/src/5.0/perl-5.10.0.tar.gz && \
   37     tar xvfz perl-5.10.0.tar.gz && \
   38     cd perl-5.10.0 && \
   39     ./configure.gnu --prefix=/usr/local/ && \
   40     make && make install && \
   41     rm -rf /perl-5.10.0.tar.gz /perl-5.10.0
   42 
   43 ####################################
   44 # These dependencies can be found in Ubuntu but they're not compiled with -fPIC,
   45 # so they cannot be statically linked into a shared library
   46 ####################################
   47 
   48 # ZLib
   49 RUN curl -O -L https://zlib.net/zlib-1.2.11.tar.gz && \
   50     tar xvfz zlib-1.2.11.tar.gz && \
   51     cd zlib-1.2.11 && \
   52     CFLAGS="-fPIC -O3" ./configure && \
   53     make && make install && \
   54     rm -rf /zlib-1.2.11.tar.gz /zlib-1.2.11
   55 
   56 # Compile OpenSSL
   57 RUN curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_1_1_0j.tar.gz && \
   58     tar xvfz OpenSSL_1_1_0j.tar.gz && \
   59     cd openssl-OpenSSL_1_1_0j/ && \
   60     ./Configure -fPIC --prefix=/usr/local/ssl/ no-shared linux-x86_64 && \
   61     make && make install && \
   62     rm -rf /OpenSSL_1_1_0j.tar.gz /openssl-OpenSSL_1_1_0j
   63 
   64 # Download and compile boost
   65 RUN curl -O -L https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.gz && \
   66     tar xvfz boost_1_68_0.tar.gz && \
   67     cd /boost_1_68_0 && \
   68     ./bootstrap.sh --with-libraries=program_options,filesystem,regex,thread,system,python && \
   69     ./b2 address-model=64 cxxflags=-fPIC link=static threading=multi variant=release install && \
   70     rm -rf /boost_1_68_0.tar.gz /boost_1_68_0
   71 
   72 # Download and copile protoubf
   73 RUN curl -O -L  https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz && \
   74     tar xvfz protobuf-cpp-3.3.0.tar.gz && \
   75     cd protobuf-3.3.0/ && \
   76     CXXFLAGS=-fPIC ./configure && \
   77     make && make install && ldconfig && \
   78     rm -rf /protobuf-cpp-3.3.0.tar.gz /protobuf-3.3.0
   79 
   80 # Compile APR
   81 RUN curl -O -L  http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz && \
   82     tar xvfz apr-1.5.2.tar.gz && \
   83     cd apr-1.5.2 && \
   84     CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure && \
   85     make && make install && \
   86     rm -rf /apr-1.5.2.tar.gz /apr-1.5.2
   87 
   88 # Compile APR-Util
   89 RUN curl -O -L  http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz && \
   90     tar xvfz apr-util-1.5.4.tar.gz && \
   91     cd apr-util-1.5.4 && \
   92     CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure -with-apr=/usr/local/apr && \
   93     make && make install && \
   94     rm -rf /apr-util-1.5.4.tar.gz /apr-util-1.5.4
   95 
   96 # Libtool
   97 RUN curl -L -O https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz && \
   98     tar xvfz libtool-2.4.6.tar.gz && \
   99     cd libtool-2.4.6 && \
  100     ./configure && \
  101     make && make install && \
  102     rm -rf /libtool-2.4.6.tar.gz /libtool-2.4.6
  103 
  104 # Compile log4cxx
  105 RUN git clone https://github.com/apache/logging-log4cxx.git && \
  106     cd logging-log4cxx && \
  107     ./autogen.sh && \
  108     CXXFLAGS=-fPIC ./configure && \
  109     make && make install && \
  110     rm -rf /logging-log4cxx
  111 
  112 # Compile expat
  113 RUN curl -O -L  https://github.com/libexpat/libexpat/archive/R_2_2_0.tar.gz && \
  114     tar xfvz R_2_2_0.tar.gz && \
  115     cd libexpat-R_2_2_0/expat && \
  116     ./buildconf.sh && \
  117     CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure  && \
  118     make && make installlib && \
  119     rm -rf /R_2_2_0.tar.gz /libexpat-R_2_2_0
  120 
  121 RUN curl -O -L https://github.com/Kitware/CMake/archive/v3.12.1.tar.gz && \
  122     tar xvfz v3.12.1.tar.gz && \
  123     cd CMake-3.12.1 && \
  124     ./configure && \
  125     make && make install && \
  126     rm -rf /v3.12.1.tar.gz /CMake-3.12.1
  127 
  128 # Compile JSON CPP
  129 RUN curl -O -L  https://github.com/open-source-parsers/jsoncpp/archive/1.8.0.tar.gz && \
  130     tar xvfz 1.8.0.tar.gz && \
  131     cd jsoncpp-1.8.0 && \
  132     cmake . -DCMAKE_POSITION_INDEPENDENT_CODE=ON && \
  133     make && make install && \
  134     rm -rf /1.8.0.tar.gz /jsoncpp-1.8.0
  135 
  136 # LibCurl
  137 RUN curl -O -L  https://github.com/curl/curl/releases/download/curl-7_61_0/curl-7.61.0.tar.gz && \
  138     tar xvfz curl-7.61.0.tar.gz && \
  139     cd curl-7.61.0 && \
  140     CFLAGS=-fPIC ./configure --with-ssl=/usr/local/ssl/ && \
  141     make && make install && \
  142     rm -rf /curl-7.61.0.tar.gz /curl-7.61.0
  143 
  144 # Zstandard
  145 RUN curl -O -L https://github.com/facebook/zstd/releases/download/v1.3.7/zstd-1.3.7.tar.gz && \
  146     tar xvfz zstd-1.3.7.tar.gz && \
  147     cd zstd-1.3.7 && \
  148     CFLAGS="-fPIC -O3" make -j8 && \
  149     make install && \
  150     rm -rf /zstd-1.3.7 /zstd-1.3.7.tar.gz
  151 
  152 # Snappy
  153 RUN curl -O -L https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz && \
  154     tar xvfz snappy-1.1.3.tar.gz && \
  155     cd snappy-1.1.3 && \
  156     CXXFLAGS="-fPIC -O3" ./configure && \
  157     make && make install && \
  158     rm -rf /snappy-1.1.3 /snappy-1.1.3.tar.gz
  159 
  160 RUN pip install twine
  161 RUN pip install fastavro
  162 RUN pip install six
  163 RUN pip install enum34
  164 
  165 
  166 ENV PYTHON_INCLUDE_DIR /opt/python/${PYTHON_SPEC}/include
  167 ENV PYTHON_LIBRARIES   /opt/python/${PYTHON_SPEC}/lib/python${PYTHON_VERSION}
  168 ENV OPENSSL_ROOT_DIR   /usr/local/ssl/
  169 
  170 COPY build-wheel-file-within-docker.sh /
  171 COPY build-client-lib-within-docker.sh /