ansible/roles/openshift-apps/bodhi/templates/dockerfile-base
Kevin Fenzi 5243c435be bodhi: leave prod alone for now
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-05-16 13:36:22 -07:00

36 lines
1.5 KiB
Text

{% if env == "staging" %}
FROM fedora:42
{% else %}
FROM fedora:40
{% endif %}
LABEL \
name="bodhi-base" \
vendor="Fedora Infrastructure" \
license="MIT"
{% if env == "staging" %}
RUN curl -o /etc/yum.repos.d/infra-tags.repo https://infrastructure.fedoraproject.org/infra/ansible/files/common/fedora-infra-tags.repo
RUN curl -o /etc/yum.repos.d/infra-tags-stg.repo https://infrastructure.fedoraproject.org/infra/ansible/files/common/fedora-infra-tags-stg.repo
{% else %}
RUN curl -o /etc/yum.repos.d/infra-tags.repo https://infrastructure.fedoraproject.org/infra/ansible/files/common/fedora-infra-tags.repo
{% endif %}
{% if env == "staging" %}
RUN dnf install -y bodhi-server python3-pyramid_sawing python3-koji-fedoramessaging-messages python3-gunicorn sed --refresh
{% else %}
RUN dnf install -y bodhi-server-{{bodhi_version}} python3-pyramid_sawing python3-koji-fedoramessaging-messages python3-gunicorn sed
{% endif %}
# link the static files for a simpler httpd.conf
RUN ln -s $(python3 -Ic "import sysconfig; print(sysconfig.get_path('purelib', 'rpm_prefix'))")/bodhi/server/static/ /srv/bodhi-static
# Set up krb5
RUN rm -f /etc/krb5.conf && \
ln -sf /etc/bodhi/krb5.conf /etc/krb5.conf && \
ln -sf /etc/keytabs/koji-keytab /etc/krb5.bodhi_bodhi{{ env_suffix }}.fedoraproject.org.keytab
{% if env == "staging" %}
# To help debug things
RUN chmod -R a+w $(python3 -Ic "import sysconfig; print(sysconfig.get_path('purelib', 'rpm_prefix'))")
RUN dnf install -y procps-ng fpaste
{% endif %}
ENV USER=openshift