Subject: UBI based container patch

From: Dave Page <[email-masked]>
Date: Mon, 1 Feb 2021 16:21:45 +0000

* 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

---

From: Dave Page <[email-masked]>
Date: Fri, 5 Feb 2021 13:47:11 +0000

* 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!