Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove development packages from Pulsar's docker images #14093

Merged
merged 4 commits into from
Feb 2, 2022

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Feb 2, 2022

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

@lhotari lhotari added component/deploy doc-not-needed Your PR changes do not impact docs labels Feb 2, 2022
@lhotari lhotari self-assigned this Feb 2, 2022
@lhotari lhotari added this to the 2.10.0 milestone Feb 2, 2022
@lhotari lhotari force-pushed the lh-remove-dev-packages branch from c4b64ee to f47b7cb Compare February 2, 2022 16:07
Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michaeljmarshall
Copy link
Member

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: #4754. We don't do that now, so we definitely don't need these dependencies.

@michaeljmarshall
Copy link
Member

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.

@lhotari
Copy link
Member Author

lhotari commented Feb 2, 2022

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

@merlimat merlimat merged commit 14a28d7 into apache:master Feb 2, 2022
@lhotari
Copy link
Member Author

lhotari commented Feb 3, 2022

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

@lhotari lhotari deleted the lh-remove-dev-packages branch February 3, 2022 07:08
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
* Remove development packages from Pulsar's docker images

* Add "--no-install-recommends" to skip installing GCC and lots of other tools

* Install ca-certificates

* Install build-essential for building pulsar-functions-go examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a smaller Pulsar docker image without unnecessary development packages
4 participants