Stream: containers

Topic: add psql bin to base


view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 12 2024 at 09:54):

I just thought I'd kick off a topic to discuss and issued @Vera Clemens opened: Feature Request/Idea: Add psql to the configbaker image #10487

view this post on Zulip Oliver Bertuch (Apr 12 2024 at 09:58):

Sure, go ahead and create a PR

view this post on Zulip Oliver Bertuch (Apr 12 2024 at 09:58):

I would like to point out though that a cleaner and more testable solution would be to make Dataverse pick up the procedures via Flyway

view this post on Zulip Oliver Bertuch (Apr 12 2024 at 09:59):

Obviously that is a lot more effort...

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 12 2024 at 09:59):

Yeah, that sounds like a new topic :sweat_smile:

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 12 2024 at 10:00):

Adding psql should be straighforward, right? Just add to an existing list of apt-get install packages or something?

view this post on Zulip Oliver Bertuch (Apr 12 2024 at 10:08):

It's Alpine so it will be "apk", but yes, more or less straightforward

view this post on Zulip Oliver Bertuch (Apr 12 2024 at 10:09):

Might be nice to have a little helper script that adds the connection options for you to sane defaults so you don't have to deal with that in simple cases

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 12 2024 at 11:33):

ARG APK_PACKAGES="curl bind-tools netcat-openbsd jq bash dumb-init wait4x ed" at https://github.com/IQSS/dataverse/blob/v6.2/modules/container-configbaker/Dockerfile#L24

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 12 2024 at 11:33):

thanks!

view this post on Zulip Oliver Bertuch (Apr 12 2024 at 11:40):

If people feel like we should add another ARG to include custom packages during build time, that's doable

view this post on Zulip Oliver Bertuch (Apr 12 2024 at 11:41):

(So you would use a Maven property in your build pipeline to add more packages)

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 12 2024 at 11:43):

Sure, but what do you think? Separate issue and PR?

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 12 2024 at 11:51):

Don't look now, @Johannes D made a PR: Added postgresql-client to the list of installed apk packages #10488

view this post on Zulip Benedikt (May 08 2024 at 08:13):

Is it also possible to get the package in Dataverse image? This allows you to run certain custom scripts.

https://github.com/IQSS/dataverse/blob/ae149dec1d319c2b383de32e8af01a47fcaaccdf/modules/container-base/src/main/docker/Dockerfile#L97

"postgresql-client"

or is there something against it?

view this post on Zulip Philip Durbin ๐Ÿš€ (May 08 2024 at 10:23):

@Benedikt sounds fine to me. Please feel free to create an issue and a pull request.

view this post on Zulip Benedikt (May 08 2024 at 10:38):

https://github.com/IQSS/dataverse/pull/10546

view this post on Zulip Philip Durbin ๐Ÿš€ (May 08 2024 at 11:09):

Thanks!

view this post on Zulip Philip Durbin ๐Ÿš€ (Jun 06 2024 at 13:45):

@Benedikt hi! @Oliver Bertuch @Thomas van Erven and I are discussing this during the weekly call and we're wondering if adding psql to the base image is necessary. It adds more exposure, possible security risks, and psql could be run from configbaker or the postgres image. Can you please say some more about your use cases? Thanks!

view this post on Zulip Philip Durbin ๐Ÿš€ (Jun 06 2024 at 14:34):

Thanks for talking this out just now on the call.

view this post on Zulip Benedikt (Jun 06 2024 at 14:35):

I have closed it, and I understand why it should not be intrgated. My question is why do you have wget and curl in there?
If you want to keep it small and clean, then you can do a bit more. Or is there a reason for this?

view this post on Zulip Philip Durbin ๐Ÿš€ (Jun 06 2024 at 14:36):

Hmm, good question, where to draw the line.

view this post on Zulip Philip Durbin ๐Ÿš€ (Jun 06 2024 at 14:39):

Should we add a comment above the ARG PKGS line? To provide some guidance?

view this post on Zulip Thomas van Erven (Jun 06 2024 at 14:47):

I think what's relevant (as well) is what's the dependency chain for those packages and how much of that is provided by the base image? Are we going out of our way to include them (hence unnecessarily increasing exposure) or is it a really minor detour?


Last updated: Oct 30 2025 at 05:14 UTC