Mailing List Archive

Solr Docker Dependencies Question
In our Dockerfile I see the line:

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

I understand how we use some of these, but not all of them.

acl package provides setfacl, and gosu provides gosu, which look to be only
used in tests? How much would we miss them if they were gone?

dirmngr is for network access by gpg, but I don't see where we use gpg in
the docker image at all.

Tini comes baked with docker engine since 1.25, so maybe we don't need it
and can provide instructions to run with --init? This seems convenient for
users though so maybe we can leave it in.

Where do we use netcat?

lsof is used in the startup scripts, wget is used at a minimum to download
jattach, procps is probably used in the startup scripts somewhere too for
top or ps or something similar to get a pid.

Thanks,
Mike
Re: Solr Docker Dependencies Question [ In reply to ]
dirmngr: We used to use gpg for validating the downloaded solr binaries.
That is gone in the new build (though will have to be added back in
depending on what we decide around the "official image"). It can be removed
for now and added back later if needed.

Netcat: I believe netcat is for easy testing of ZK connection? Could be
wrong around the reasoning for that.

Gosu/Setfacl: I'm not 100% sure, but I believe you are correct that
it's only used for tests.

tini: For docker, yes it's not necessary. But there are plenty of
container use cases outside of Docker (such as Kubernetes). If my
understanding is correct, the default use of the solr image
<https://github.com/apache/lucene-solr/blob/master/solr/docker/scripts/solr-fg#L15>
will invoke tini, so it's not something we will want to remove. Otherwise,
things like the OOM script will stop working.

wget: We need some way of connecting to HTTP in my opinion. Maybe I'm alone
here, but I find it frustrating that the image does not have curl installed.

- Houston

On Thu, Feb 25, 2021 at 11:26 AM Mike Drob <mdrob@mdrob.com> wrote:

> In our Dockerfile I see the line:
>
> > apt-get -y install acl dirmngr lsof procps wget netcat gosu tini;
>
> I understand how we use some of these, but not all of them.
>
> acl package provides setfacl, and gosu provides gosu, which look to be
> only used in tests? How much would we miss them if they were gone?
>
> dirmngr is for network access by gpg, but I don't see where we use gpg in
> the docker image at all.
>
> Tini comes baked with docker engine since 1.25, so maybe we don't need it
> and can provide instructions to run with --init? This seems convenient for
> users though so maybe we can leave it in.
>
> Where do we use netcat?
>
> lsof is used in the startup scripts, wget is used at a minimum to download
> jattach, procps is probably used in the startup scripts somewhere too for
> top or ps or something similar to get a pid.
>
> Thanks,
> Mike
>
Re: Solr Docker Dependencies Question [ In reply to ]
> On 25 Feb 2021, at 16:25, Mike Drob <mdrob@mdrob.com> wrote:
>
> acl package provides setfacl, and

Used in the container for example here: https://github.com/docker-solr/docker-solr/commit/6f7a6e812247d00f9f3c293993e26d6d041c119e#diff-ea928530c80bf9f58a3fbf840228fde8ee6bc208cae85dd7c2abda473eea8d20R37

> gosu provides gosu, which look to be only used in tests? How much would we miss them if they were gone?

previous discussion: https://github.com/docker-solr/docker-solr/issues/270#issuecomment-569420443

> Where do we use netcat?

https://github.com/docker-solr/docker-solr/blob/master/scripts/wait-for-zookeeper.sh#L49

> wget is used at a minimum to download jattach

https://github.com/docker-solr/docker-solr/blob/master/scripts/wait-for-solr.sh#L82

> procps is probably used in the startup scripts somewhere too for top or ps or something similar to get a pid.

I think that was for these:

https://github.com/apache/lucene-solr/blob/master/solr/bin/solr#L685
https://github.com/apache/lucene-solr/blob/master/solr/bin/solr#L759

-- Martijn
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org