You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/02 11:17:48 UTC

[GitHub] [pulsar] lhotari opened a new pull request #14093: Remove development packages from Pulsar's docker images

lhotari opened a new pull request #14093:
URL: https://github.com/apache/pulsar/pull/14093


   Fixes #14092
   
   ### Motivation
   
   There's a lot of unnecessary tooling that gets installed in the Pulsar docker images.
   
   ### Modifications
   
   - remove dev packages
   - use python3-pip package for installing pip


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on a change in pull request #14093: Remove development packages from Pulsar's docker images

Posted by GitBox <gi...@apache.org>.
lhotari commented on a change in pull request #14093:
URL: https://github.com/apache/pulsar/pull/14093#discussion_r797885930



##########
File path: docker/pulsar/Dockerfile
##########
@@ -48,17 +48,13 @@ RUN sed -i "s|http://archive\.ubuntu\.com/ubuntu/|${UBUNTU_MIRROR:-mirror://mirr
      && apt-get update \
      && apt-get -y dist-upgrade \
      && apt-get -y install openjdk-11-jdk-headless netcat dnsutils less procps iputils-ping \
-                 python3 python3-dev python3-setuptools python3-yaml python3-kazoo \
-                 libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev \
+                 python3 python3-yaml python3-kazoo python3-pip \

Review comment:
       `apt-get install --no-install-recommends python3-pip` seems omit GCC and a lot of other stuff.
   
   Could be verified with a "simulated" apt-get install by passing `-s`:
   ```
   docker run --rm -it ubuntu:20.04 bash -c 'apt-get update && apt-get install -s --no-install-recommends python3-pip'
   ```
   vs.
   ```
   docker run --rm -it ubuntu:20.04 bash -c 'apt-get update && apt-get install -s python3-pip'
   ```
   
   




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] michaeljmarshall commented on pull request #14093: Remove development packages from Pulsar's docker images

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on pull request #14093:
URL: https://github.com/apache/pulsar/pull/14093#issuecomment-1028138625


   Note that the `RUN apt-get` docker image layer is 1 gigabyte in 2.9.1. I am hopeful that this will help cut down on our docker image size.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat merged pull request #14093: Remove development packages from Pulsar's docker images

Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #14093:
URL: https://github.com/apache/pulsar/pull/14093


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat commented on a change in pull request #14093: Remove development packages from Pulsar's docker images

Posted by GitBox <gi...@apache.org>.
merlimat commented on a change in pull request #14093:
URL: https://github.com/apache/pulsar/pull/14093#discussion_r797877041



##########
File path: docker/pulsar/Dockerfile
##########
@@ -48,17 +48,13 @@ RUN sed -i "s|http://archive\.ubuntu\.com/ubuntu/|${UBUNTU_MIRROR:-mirror://mirr
      && apt-get update \
      && apt-get -y dist-upgrade \
      && apt-get -y install openjdk-11-jdk-headless netcat dnsutils less procps iputils-ping \
-                 python3 python3-dev python3-setuptools python3-yaml python3-kazoo \
-                 libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev \
+                 python3 python3-yaml python3-kazoo python3-pip \

Review comment:
       I think adding `python3-pip` will be pulling in GCC and a bunch of other stuff. That was the reason to fetch `get-pip.py` instead.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on a change in pull request #14093: Remove development packages from Pulsar's docker images

Posted by GitBox <gi...@apache.org>.
lhotari commented on a change in pull request #14093:
URL: https://github.com/apache/pulsar/pull/14093#discussion_r797882753



##########
File path: docker/pulsar/Dockerfile
##########
@@ -48,17 +48,13 @@ RUN sed -i "s|http://archive\.ubuntu\.com/ubuntu/|${UBUNTU_MIRROR:-mirror://mirr
      && apt-get update \
      && apt-get -y dist-upgrade \
      && apt-get -y install openjdk-11-jdk-headless netcat dnsutils less procps iputils-ping \
-                 python3 python3-dev python3-setuptools python3-yaml python3-kazoo \
-                 libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev \
+                 python3 python3-yaml python3-kazoo python3-pip \

Review comment:
       I'll try to find a solution for that. Perhaps `--no-install-recommends` works.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #14093: Remove development packages from Pulsar's docker images

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #14093:
URL: https://github.com/apache/pulsar/pull/14093#issuecomment-1028669174


   Just adding a link to a blog post which explains the need to use `--no-install-recommends` when creating docker images: https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] michaeljmarshall commented on pull request #14093: Remove development packages from Pulsar's docker images

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on pull request #14093:
URL: https://github.com/apache/pulsar/pull/14093#issuecomment-1028130362


   For reference, I was wondering why we had these dependencies in the first place. It looks like they were needed because at one point we were building python from source: https://github.com/apache/pulsar/pull/4754. We don't do that now, so we definitely don't need these dependencies.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #14093: Remove development packages from Pulsar's docker images

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #14093:
URL: https://github.com/apache/pulsar/pull/14093#issuecomment-1028226215


   @merlimat I pushed changes to omit installing GCC when python3-pip package gets installed. Let's see if the build and tests continue to pass.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org