Re: UBI based container patch

From: Dave Page <dpage(at)pgadmin(dot)org>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: UBI based container patch
Date: 2021-02-05 13:47:11
Message-ID: CA+OCxoyNaokyPNgJi0yi4dBSxJR-FH8ueE62_VSPfKSQyBZxUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

* Do not commit this! *

For the archives....

I reworked the patch to minimise the size of the resulting container. I
managed to knock 52MB off, taking it down to 410MB. In parallel, I also
managed to reduce the size of the Alpine container by about 25MB as I
realised we were shipping some files that aren't required.

To reduce the size of the UBI container, I essentially built a 'ubi-micro'
container, by installing only the RPMs that are actually required into an
alternate root directory from within the standard UBI container, and then
copied that directory into the root of a 'FROM scratch' container.
Unfortunately it seems that the issue is essentially the RPM packaging;
pulling in things like Postfix also pulls in a huge amount of dependencies
that aren't really required (for pgAdmin). Alpine avoids this by minimising
their package dependencies.

So, I think it's not feasible to move to UBI, without adding a lot to the
size of the resulting container.

Here's the patch anyway!

On Mon, Feb 1, 2021 at 4:21 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:

> * Do not commit this! *
>
> The dev team have discussed moving the pgAdmin container to be based on
> Redhat's UBI instead of Alpine Linux. I got some time today to work on
> that, and a patch is attached for interest/archives.
>
> Whilst the build process is arguably cleaner with this patch, plus it
> would be easier to maintain the versions of the PostgreSQL tools that are
> included, unfortunately using UBI takes the size of the container from
> ~278MB to ~462MB.
>
> So... unless someone finds a huge error in the patch that causes this
> bloat, I think we have no choice but to stick with Alpine Linux.
>
> Any thoughts/comments?
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

Attachment Content-Type Size
ubi-container_v2.diff application/octet-stream 12.3 KB

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2021-02-05 16:18:53 pgAdmin 4 commit: Convert READMEs to lightly formatted markdown, so the
Previous Message Dave Page 2021-02-05 12:51:30 pgAdmin 4 commit: Remove a few files from the appbundle that aren't req