containers: don't install epel-release on Fedora (#37766)

This commit is contained in:
Jonathon Anderson 2023-06-06 15:50:46 -04:00 committed by GitHub
parent 268649654d
commit f41446258a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 54 additions and 44 deletions

View File

@ -636,7 +636,7 @@ to customize the generation of container recipes:
- No - No
* - ``os_packages:command`` * - ``os_packages:command``
- Tool used to manage system packages - Tool used to manage system packages
- ``apt``, ``yum``, ``zypper``, ``apk``, ``yum_amazon`` - ``apt``, ``yum``, ``dnf``, ``dnf_epel``, ``zypper``, ``apk``, ``yum_amazon``
- Only with custom base images - Only with custom base images
* - ``os_packages:update`` * - ``os_packages:update``
- Whether or not to update the list of available packages - Whether or not to update the list of available packages

View File

@ -17,7 +17,7 @@
"template": "container/fedora_38.dockerfile", "template": "container/fedora_38.dockerfile",
"image": "docker.io/fedora:38" "image": "docker.io/fedora:38"
}, },
"os_package_manager": "yum", "os_package_manager": "dnf",
"build": "spack/fedora38", "build": "spack/fedora38",
"build_tags": { "build_tags": {
"develop": "latest" "develop": "latest"
@ -31,7 +31,7 @@
"template": "container/fedora_37.dockerfile", "template": "container/fedora_37.dockerfile",
"image": "docker.io/fedora:37" "image": "docker.io/fedora:37"
}, },
"os_package_manager": "yum", "os_package_manager": "dnf",
"build": "spack/fedora37", "build": "spack/fedora37",
"build_tags": { "build_tags": {
"develop": "latest" "develop": "latest"
@ -45,7 +45,7 @@
"template": "container/rockylinux_9.dockerfile", "template": "container/rockylinux_9.dockerfile",
"image": "docker.io/rockylinux:9" "image": "docker.io/rockylinux:9"
}, },
"os_package_manager": "yum", "os_package_manager": "dnf_epel",
"build": "spack/rockylinux9", "build": "spack/rockylinux9",
"build_tags": { "build_tags": {
"develop": "latest" "develop": "latest"
@ -59,7 +59,7 @@
"template": "container/rockylinux_8.dockerfile", "template": "container/rockylinux_8.dockerfile",
"image": "docker.io/rockylinux:8" "image": "docker.io/rockylinux:8"
}, },
"os_package_manager": "yum", "os_package_manager": "dnf_epel",
"build": "spack/rockylinux8", "build": "spack/rockylinux8",
"build_tags": { "build_tags": {
"develop": "latest" "develop": "latest"
@ -73,7 +73,7 @@
"template": "container/almalinux_9.dockerfile", "template": "container/almalinux_9.dockerfile",
"image": "quay.io/almalinux/almalinux:9" "image": "quay.io/almalinux/almalinux:9"
}, },
"os_package_manager": "yum", "os_package_manager": "dnf_epel",
"build": "spack/almalinux9", "build": "spack/almalinux9",
"build_tags": { "build_tags": {
"develop": "latest" "develop": "latest"
@ -87,7 +87,7 @@
"template": "container/almalinux_8.dockerfile", "template": "container/almalinux_8.dockerfile",
"image": "quay.io/almalinux/almalinux:8" "image": "quay.io/almalinux/almalinux:8"
}, },
"os_package_manager": "yum", "os_package_manager": "dnf_epel",
"build": "spack/almalinux8", "build": "spack/almalinux8",
"build_tags": { "build_tags": {
"develop": "latest" "develop": "latest"
@ -101,7 +101,7 @@
"template": "container/centos_stream.dockerfile", "template": "container/centos_stream.dockerfile",
"image": "quay.io/centos/centos:stream" "image": "quay.io/centos/centos:stream"
}, },
"os_package_manager": "yum", "os_package_manager": "dnf_epel",
"build": "spack/centos-stream", "build": "spack/centos-stream",
"final": { "final": {
"image": "quay.io/centos/centos:stream" "image": "quay.io/centos/centos:stream"
@ -185,6 +185,16 @@
"install": "apt-get -yqq install", "install": "apt-get -yqq install",
"clean": "rm -rf /var/lib/apt/lists/*" "clean": "rm -rf /var/lib/apt/lists/*"
}, },
"dnf": {
"update": "dnf update -y",
"install": "dnf install -y",
"clean": "rm -rf /var/cache/dnf && dnf clean all"
},
"dnf_epel": {
"update": "dnf update -y && dnf install -y epel-release && dnf update -y",
"install": "dnf install -y",
"clean": "rm -rf /var/cache/dnf && dnf clean all"
},
"yum": { "yum": {
"update": "yum update -y && yum install -y epel-release && yum update -y", "update": "yum update -y && yum install -y epel-release && yum update -y",
"install": "yum install -y", "install": "yum install -y",

View File

@ -1,7 +1,7 @@
{% extends "container/bootstrap-base.dockerfile" %} {% extends "container/bootstrap-base.dockerfile" %}
{% block install_os_packages %} {% block install_os_packages %}
RUN yum update -y \ RUN dnf update -y \
&& yum install -y \ && dnf install -y \
bzip2 \ bzip2 \
curl \ curl \
file \ file \
@ -23,6 +23,6 @@ RUN yum update -y \
unzip \ unzip \
zstd \ zstd \
&& pip3 install boto3 \ && pip3 install boto3 \
&& rm -rf /var/cache/yum \ && rm -rf /var/cache/dnf \
&& yum clean all && dnf clean all
{% endblock %} {% endblock %}

View File

@ -1,9 +1,9 @@
{% extends "container/bootstrap-base.dockerfile" %} {% extends "container/bootstrap-base.dockerfile" %}
{% block install_os_packages %} {% block install_os_packages %}
RUN yum update -y \ RUN dnf update -y \
&& yum install -y epel-release \ && dnf install -y epel-release \
&& yum update -y \ && dnf update -y \
&& yum --enablerepo epel install -y \ && dnf --enablerepo epel install -y \
bzip2 \ bzip2 \
curl-minimal \ curl-minimal \
file \ file \
@ -25,6 +25,6 @@ RUN yum update -y \
unzip \ unzip \
zstd \ zstd \
&& pip3 install boto3 \ && pip3 install boto3 \
&& rm -rf /var/cache/yum \ && rm -rf /var/cache/dnf \
&& yum clean all && dnf clean all
{% endblock %} {% endblock %}

View File

@ -1,13 +1,13 @@
{% extends "container/bootstrap-base.dockerfile" %} {% extends "container/bootstrap-base.dockerfile" %}
{% block install_os_packages %} {% block install_os_packages %}
RUN yum update -y \ RUN dnf update -y \
# See https://fedoraproject.org/wiki/EPEL#Quickstart for powertools # See https://fedoraproject.org/wiki/EPEL#Quickstart for powertools
&& yum install -y dnf-plugins-core \ && dnf install -y dnf-plugins-core \
&& dnf config-manager --set-enabled powertools \ && dnf config-manager --set-enabled powertools \
&& yum install -y epel-release \ && dnf install -y epel-release \
&& yum update -y \ && dnf update -y \
&& yum --enablerepo epel groupinstall -y "Development Tools" \ && dnf --enablerepo epel groupinstall -y "Development Tools" \
&& yum --enablerepo epel install -y \ && dnf --enablerepo epel install -y \
curl \ curl \
findutils \ findutils \
gcc-c++ \ gcc-c++ \
@ -24,6 +24,6 @@ RUN yum update -y \
python38-setuptools \ python38-setuptools \
unzip \ unzip \
&& pip3 install boto3 \ && pip3 install boto3 \
&& rm -rf /var/cache/yum \ && rm -rf /var/cache/dnf \
&& yum clean all && dnf clean all
{% endblock %} {% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "container/bootstrap-base.dockerfile" %} {% extends "container/bootstrap-base.dockerfile" %}
{% block install_os_packages %} {% block install_os_packages %}
RUN yum update -y \ RUN dnf update -y \
&& yum install -y \ && dnf install -y \
bzip2 \ bzip2 \
curl \ curl \
file \ file \
@ -24,6 +24,6 @@ RUN yum update -y \
zstd \ zstd \
xz \ xz \
&& pip3 install boto3 \ && pip3 install boto3 \
&& rm -rf /var/cache/yum \ && rm -rf /var/cache/dnf \
&& yum clean all && dnf clean all
{% endblock %} {% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "container/bootstrap-base.dockerfile" %} {% extends "container/bootstrap-base.dockerfile" %}
{% block install_os_packages %} {% block install_os_packages %}
RUN yum update -y \ RUN dnf update -y \
&& yum install -y \ && dnf install -y \
bzip2 \ bzip2 \
curl \ curl \
file \ file \
@ -24,6 +24,6 @@ RUN yum update -y \
xz \ xz \
zstd \ zstd \
&& pip3 install boto3 \ && pip3 install boto3 \
&& rm -rf /var/cache/yum \ && rm -rf /var/cache/dnf \
&& yum clean all && dnf clean all
{% endblock %} {% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "container/bootstrap-base.dockerfile" %} {% extends "container/bootstrap-base.dockerfile" %}
{% block install_os_packages %} {% block install_os_packages %}
RUN yum update -y \ RUN dnf update -y \
&& yum install -y \ && dnf install -y \
bzip2 \ bzip2 \
curl \ curl \
file \ file \
@ -24,6 +24,6 @@ RUN yum update -y \
xz \ xz \
zstd \ zstd \
&& pip3 install boto3 \ && pip3 install boto3 \
&& rm -rf /var/cache/yum \ && rm -rf /var/cache/dnf \
&& yum clean all && dnf clean all
{% endblock %} {% endblock %}

View File

@ -1,9 +1,9 @@
{% extends "container/bootstrap-base.dockerfile" %} {% extends "container/bootstrap-base.dockerfile" %}
{% block install_os_packages %} {% block install_os_packages %}
RUN yum update -y \ RUN dnf update -y \
&& yum install -y epel-release \ && dnf install -y epel-release \
&& yum update -y \ && dnf update -y \
&& yum --enablerepo epel install -y \ && dnf --enablerepo epel install -y \
bzip2 \ bzip2 \
curl-minimal \ curl-minimal \
file \ file \
@ -26,6 +26,6 @@ RUN yum update -y \
xz \ xz \
zstd \ zstd \
&& pip3 install boto3 \ && pip3 install boto3 \
&& rm -rf /var/cache/yum \ && rm -rf /var/cache/dnf \
&& yum clean all && dnf clean all
{% endblock %} {% endblock %}