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

SOLR-16484 Remove gpg from image, slimming it down some Mb #1084

Merged
merged 4 commits into from
Oct 20, 2022

Conversation

janhoy
Copy link
Contributor

@janhoy janhoy commented Oct 17, 2022

https://issues.apache.org/jira/browse/SOLR-16484

Small improvement to shave off some Mb

@janhoy
Copy link
Contributor Author

janhoy commented Oct 17, 2022

I see that Dockerfile.body.template includes this line at the bottom:

    apt-get -y install acl dirmngr lsof procps wget netcat gosu tini jattach; \

...which installs both wget and dirmngr again. I see that a few of the scripts/ use wget, so it probably needs to stay (unless we can convert them to using curl), but why do we need dirmngr in the image runtime?

@dsmiley
Copy link
Contributor

dsmiley commented Oct 18, 2022

Shaving MB usually gets my approval :-)
(I have no clue RE dirmngr).

@janhoy
Copy link
Contributor Author

janhoy commented Oct 18, 2022

Shaving MB usually gets my approval :-)

Sure. I hope we can use jlink in the future to shave off some JDK modules. The debian distro is already quite slim, but avoiding too many apt-get installs is important, they also drag in lib dependencies. However, removing less used jar dependencies from Solr is probably the main way to continue shaving. If only SolrCell could be a standalone project...

@dsmiley
Copy link
Contributor

dsmiley commented Oct 18, 2022

I think coming up with multiple tags would be how to slim further. solr:9-slim solr:9, solr:9-andTika, solr:9-prometheus
And also, continue Solr-package investments to make it easier to "install".

@HoustonPutman
Copy link
Contributor

I think at some point it is very useful to have a tool inside the container, either wget or curl, that lets us debug issues with Solr.

@janhoy
Copy link
Contributor Author

janhoy commented Oct 18, 2022

I think at some point it is very useful to have a tool inside the container, either wget or curl, that lets us debug issues with Solr.

Agree very much. Now we have both. wget weighs less than 1Mb so not worth the effort to convert all scripts to using cURL I think. But it could be done if one wanted.

@janhoy
Copy link
Contributor Author

janhoy commented Oct 18, 2022

@HoustonPutman do you recall why we have dirmngr in the last RUN command? I think perhaps it is a leftover from when splitting Dockerfile into templates for local and prod. Then you moved the apt-get from top of the old Dockerfile to later in the body. I'm going to try to remove it ans run all integration tests...

@HoustonPutman
Copy link
Contributor

Ahh didn't see your last change. But I don't remember off the top of my head. Probably test related, but I'm not confident.

@janhoy janhoy changed the title Remove gpg and wget binaries from image, slimming it down some 8,5Mb SOLR-16484 Remove gpg and wget binaries from image, slimming it down some 8,5Mb Oct 20, 2022
@janhoy janhoy changed the title SOLR-16484 Remove gpg and wget binaries from image, slimming it down some 8,5Mb SOLR-16484 Remove gpg from image, slimming it down some Mb Oct 20, 2022
@janhoy janhoy merged commit efa2a46 into apache:main Oct 20, 2022
@janhoy janhoy deleted the remove-gpg-from-docker-image branch October 20, 2022 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants