"Fossies" - the Fresh Open Source Software Archive

Member "apache-pulsar-2.6.0/docker/pulsar/Dockerfile" (9 Jun 2020, 2577 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 latest Fossies "Diffs" side-by-side code changes report for "Dockerfile": 2.5.2_vs_2.6.0.

    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 # First create a stage with just the Pulsar tarball and scripts
   21 FROM busybox as pulsar
   22 
   23 ARG PULSAR_TARBALL
   24 
   25 ADD ${PULSAR_TARBALL} /
   26 RUN mv /apache-pulsar-* /pulsar
   27 
   28 COPY scripts/apply-config-from-env.py /pulsar/bin
   29 COPY scripts/gen-yml-from-env.py /pulsar/bin
   30 COPY scripts/generate-zookeeper-config.sh /pulsar/bin
   31 COPY scripts/pulsar-zookeeper-ruok.sh /pulsar/bin
   32 COPY scripts/watch-znode.py /pulsar/bin
   33 COPY scripts/set_python_version.sh /pulsar/bin
   34 COPY scripts/install-pulsar-client-27.sh /pulsar/bin
   35 COPY scripts/install-pulsar-client-37.sh /pulsar/bin
   36 
   37 
   38 ### Create 2nd stage from OpenJDK image
   39 ### and add Python dependencies (for Pulsar functions)
   40 
   41 FROM openjdk:8-jdk-slim
   42 
   43 # Install some utilities
   44 RUN apt-get update \
   45      && apt-get install -y netcat dnsutils less procps iputils-ping \
   46                  python2.7 python-setuptools python-yaml python-kazoo \
   47                  python3.7 python3-setuptools python3-yaml python3-kazoo \
   48                  libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev \
   49                  curl \
   50      && apt-get clean \
   51      && rm -rf /var/lib/apt/lists/*
   52 
   53 RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
   54 RUN python2.7 get-pip.py
   55 RUN python3.7 get-pip.py
   56 
   57 ADD target/python-client/ /pulsar/pulsar-client
   58 ADD target/cpp-client/ /pulsar/cpp-client
   59 RUN echo networkaddress.cache.ttl=1 >> $JAVA_HOME/jre/lib/security/java.security
   60 RUN apt-get update \
   61      && apt install -y /pulsar/cpp-client/*.deb \
   62      && apt-get clean \
   63      && rm -rf /var/lib/apt/lists/*
   64 
   65 VOLUME  ["/pulsar/conf", "/pulsar/data"]
   66 
   67 ENV PULSAR_ROOT_LOGGER=INFO,CONSOLE
   68 
   69 
   70 COPY --from=pulsar /pulsar /pulsar
   71 WORKDIR /pulsar
   72 
   73 RUN /pulsar/bin/install-pulsar-client-27.sh
   74 RUN /pulsar/bin/install-pulsar-client-37.sh
   75