Skip to content

Commit

Permalink
remove many references to el7, centos, and yum
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Dykstra <[email protected]>
  • Loading branch information
DrDaveD committed Jul 12, 2024
1 parent b18cdd2 commit f07e0c5
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 28 deletions.
22 changes: 11 additions & 11 deletions appendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ Docker images are comprised of layers that are assembled at runtime to
create an image. You can use Docker layers to create a base image, and
then add your own custom software. For example, you might use Docker's
Ubuntu image layers to create an Ubuntu {Project} container. You
could do the same with CentOS, Debian, Arch, Suse, Alpine, BusyBox, etc.
could do the same with Fedora, Debian, Arch, Suse, Alpine, BusyBox, etc.

Or maybe you want a container that already has software installed. For
instance, maybe you want to build a container that uses CUDA and cuDNN
Expand Down Expand Up @@ -809,13 +809,13 @@ the new image during bootstrap.

.. _sec:build-yum:

This module allows you to build a Red Hat/CentOS/Scientific Linux style
container from a mirror URI.
This module allows you to build a Red Hat style
container from a mirror URI based on yum or dnf.

Overview
--------

Use the ``yum`` module to specify a base for a CentOS-like container.
Use the ``yum`` module to specify a base for a RHEL-like container.
You must also specify the URI for the mirror you would like to use.

Keywords
Expand All @@ -830,29 +830,29 @@ module to use.

.. code:: {command}

OSVersion: 7
OSVersion: 9

The OSVersion keyword is optional. It specifies the OS version you would
like to use. It is only required if you have specified a %{OSVERSION}
variable in the ``MirrorURL`` keyword.

.. code:: {command}

MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/
MirrorURL: http://repo.almalinux.org/almalinux/%{OSVERSION}/BaseOS/x86_64/os

The MirrorURL keyword is mandatory. It specifies the URI to use as a
mirror to download the OS. If you define the ``OSVersion`` keyword, then
you can use it in the URI as in the example above.

.. code:: {command}

Include: yum
Include: dnf

The Include keyword is optional. It allows you to install additional
packages into the core operating system. It is a best practice to supply
only the bare essentials such that the ``%post`` section has what it
needs to properly complete the build. One common package you may want to
install when using the ``yum`` build module is YUM itself.
install when using the ``yum`` build module is YUM or DNF itself.

Notes
-----
Expand All @@ -864,7 +864,7 @@ system. If the RPM implementation inside the container is not compatible
with the RPM database that was used to create the container, RPM and YUM
commands inside the container may fail. This issue can be easily
demonstrated by bootstrapping an older RHEL compatible image by a newer
one (e.g. bootstrap a Centos 6 container from a Centos 7 host).
one (e.g. bootstrap a RHEL 8 container from a RHEL 9 host).

In order to use the ``yum`` build module, you must have ``yum``
installed on your system. It may seem counter-intuitive to install YUM
Expand Down Expand Up @@ -939,11 +939,11 @@ like so:
$ sudo apt-get update && sudo apt-get install debootstrap
On CentOS you can install it from the epel repos like so:
On RHEL you can install it from the epel repos like so:

.. code::
$ sudo yum update && sudo yum install epel-release && sudo yum install debootstrap.noarch
$ sudo dnf update && sudo dnf install epel-release && sudo dnf install debootstrap.noarch
.. _build-arch:

Expand Down
12 changes: 6 additions & 6 deletions definition_files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,17 @@ that uses the ``From`` keyword to build a Debian container:
.. code:: {command}

Bootstrap: docker
From: debian:7
From: debian:10

A def file that uses an official mirror to install CentOS 7 might look
like this:

.. code:: {command}

Bootstrap: yum
OSVersion: 7
MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/
Include: yum
OSVersion: 9
MirrorURL: http://repo.almalinux.org/almalinux/%{OSVERSION}/BaseOS/x86_64/os
Include: dnf

Each bootstrap agent enables its own options and keywords, which you can
read about, and see examples of, in the :ref:`appendix <buildmodules>`.
Expand All @@ -97,8 +97,8 @@ Other bootstrap agents

- :ref:`library <build-library-module>` (images hosted on Library API Registries)
- :ref:`shub <build-shub>` (images hosted on Singularity Hub)
- :ref:`yum <build-yum>` (yum-based systems such as CentOS and
Scientific Linux)
- :ref:`yum <build-yum>` (yum- or dnf- based systems such as RHEL and
its derivatives)
- :ref:`debootstrap <build-debootstrap>` (apt-based systems such as
Debian and Ubuntu)
- oci (bundle compliant with OCI Image Specification)
Expand Down
10 changes: 5 additions & 5 deletions fakeroot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Add package to a writable overlay
.. code::
mkdir /tmp/test.overlay
{command} exec --fakeroot --overlay /tmp/test.overlay /tmp/test.sif yum -y install openssh
{command} exec --fakeroot --overlay /tmp/test.overlay /tmp/test.sif dnf -y install openssh
Ping from container:
--------------------
Expand Down Expand Up @@ -250,13 +250,13 @@ containing this:
.. code:: {command}

Bootstrap: docker
From: docker://centos:7
From: docker://rockylinux:8

%post
yum install -y epel-release
yum install -y fakeroot
dnf install -y epel-release
dnf install -y fakeroot
fakeroot bash -c '
yum install -y openssh
dnf install -y openssh
'

then build with
Expand Down
4 changes: 2 additions & 2 deletions introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ most people are most familiar with. It is where applications, libraries
and system services run.

Traditionally you use an operating system that has a fixed combination
of kernel and user space. If you have access to a machine running CentOS
of kernel and user space. If you have access to a machine running RHEL
then you cannot install software that was packaged for Ubuntu on it,
because the user space of these distributions is not compatible. It can
also be very difficult to install multiple versions of the same
Expand All @@ -63,7 +63,7 @@ workflows over time.
Containers change the user space into a swappable component. This means
that the entire user space portion of a Linux operating system,
including programs, custom configurations, and environment can be
independent of whether your system is running CentOS, Fedora etc.,
independent of whether your system is running RHEL, Fedora etc.,
underneath. {AProject} container packages up whatever you need into
a single, verifiable file.

Expand Down
2 changes: 1 addition & 1 deletion quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ recommended that you build a SIF file using {aProject} definition file.
This also makes it easy to add files, environment variables, and install custom
software. You can start with base images from Docker Hub and use
images directly from official repositories such as Ubuntu, Debian,
CentOS, Arch, and BusyBox.
Fedora, Arch, and BusyBox.

A definition file has a header and a body. The header determines the
base container to begin with, and the body is further divided into
Expand Down
2 changes: 1 addition & 1 deletion running_services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ typically install the package for the web server and then instruct systemd

.. code::
$ sudo yum install nginx
$ sudo dnf install nginx
$ sudo systemctl enable --now nginx
If you were to attempt this in a container, it's likely that it will not work as
Expand Down
4 changes: 2 additions & 2 deletions security_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ file and enter the container with full capabilities using the

.. code::
$ sudo {command} exec --keep-privs docker://centos:7 ping -c 1 8.8.8.8
$ sudo {command} exec --keep-privs docker://rockylinux:8 ping -c 1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=128 time=18.8 ms
Expand All @@ -179,7 +179,7 @@ inside the container:

.. code::
$ sudo {command} exec --drop-caps CAP_NET_RAW docker://centos:7 ping -c 1 8.8.8.8
$ sudo {command} exec --drop-caps CAP_NET_RAW docker://rockylinux:8 ping -c 1 8.8.8.8
ping: socket: Operation not permitted
The ``drop-caps`` option will also accept the case insensitive keyword
Expand Down

0 comments on commit f07e0c5

Please sign in to comment.