merlimat commented on a change in pull request #4184: Use multi-stage build for Docker images URL: https://github.com/apache/pulsar/pull/4184#discussion_r284971006
########## File path: docker/pulsar/Dockerfile ########## @@ -36,6 +34,25 @@ COPY scripts/set_python_version.sh /pulsar/bin COPY scripts/install-pulsar-client-27.sh /pulsar/bin COPY scripts/install-pulsar-client-35.sh /pulsar/bin + +### Create 2nd stage from OpenJDK image +### and add Python dependencies (for Pulsar functions) + +FROM openjdk:8-jdk-slim +COPY --from=pulsar /pulsar /pulsar + +# Install some utilities +RUN apt-get update \ + && apt-get install -y netcat dnsutils \ + python2.7 python-setuptools \ + python3 python3-setuptools \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN easy_install pip +RUN pip install kazoo pyyaml +RUN easy_install3 pip Review comment: Do we need both for py2 and py3? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
