OpenShift compatible Images

From: Volker Mauel <volkermauel(at)gmail(dot)com>
To: pgadmin-hackers(at)lists(dot)postgresql(dot)org
Subject: OpenShift compatible Images
Date: 2022-02-05 08:07:25
Message-ID: CAE_bwCsMk18VH9md_sXdZJS41wmeLnGUnBxW+ofS2k3gBfQ8nw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hey all,

Due to the more strict nature of OpenShifts handling of security contexts,
the currently released image does not work out of the box on OpenShift.

I'd like to suggest either providing an OpenShift-compatible image on its
own, or modify the default image just slightly to accommodate for the
necessary changes in OpenShift.

This is what I'm currently using:

FROM dpage/pgadmin4:latest

#Run the following as root-user to set permissions etc
USER 0

# OpenShift-Compatibility
RUN mkdir -p /var/lib/pgadmin && \
chown 1001:0 /var/lib/pgadmin && \
touch /pgadmin4/config_distro.py && \
chown 1001:0 /pgadmin4/config_distro.py && \
setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/python3.9 && \
echo "pgadmin ALL = NOPASSWD: /usr/sbin/postfix start" >
/etc/sudoers.d/postfix && \
mkdir -p /var/lib/pgadmin && \
chown 1001:0 /var/lib/pgadmin && \
chmod 700 /var/lib/pgadmin && \
mkdir -p /var/log/pgadmin && \
chown 1001:0 /var/log/pgadmin && \
touch /pgadmin4/config_distro.py && \
chown 1001:0 /pgadmin4/config_distro.py && \
chmod 770 /pgadmin4/config_distro.py

USER 1001

# Finish up
VOLUME /var/lib/pgadmin
EXPOSE 8080 8443

Feel free to modify it to your liking, I hope this helps.

- Volker Mauel

Browse pgadmin-hackers by date

  From Date Subject
Next Message emuser20140816@gmail.com 2022-02-06 19:22:29 Re: Translators: Release next week
Previous Message Jan Birk 2022-02-05 08:00:42 Translations