Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace centos:8 with centos:stream8 #3431

Merged
merged 1 commit into from
Feb 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ def environ():

# adds extra environment variables that may be needed during testing
if not os.environ.get("TEST_BASE_IMAGE", ""):
os.environ["TEST_BASE_IMAGE"] = "docker.io/pycontribs/centos:8"
os.environ["TEST_BASE_IMAGE"] = "quay.io/centos/centos:stream8"
19 changes: 8 additions & 11 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ and ``Dockerfile.j2`` as follows.
Append the following code block to the end of ``Dockerfile.j2``. It creates an
``ansible`` user with passwordless sudo privileges.

The variable ``SUDO_GROUP`` depends on the target distribution. ``centos:8``
uses ``wheel``.
The variable ``SUDO_GROUP`` depends on the target distribution.

.. code-block:: docker

Expand All @@ -45,7 +44,7 @@ Modify ``provisioner.inventory`` in ``molecule.yml`` as follows:

platforms:
- name: instance
image: centos:8
image: quay.io/centos/centos:stream8
# …

.. code-block:: yaml
Expand All @@ -67,7 +66,7 @@ An example for a different platform instance name:

platforms:
- name: centos8
image: centos:8
image: quay.io/centos/centos:stream8
# …

.. code-block:: yaml
Expand Down Expand Up @@ -179,17 +178,16 @@ and command as follows.

platforms:
- name: instance
image: centos:8
image: quay.io/centos/centos:stream8
command: /sbin/init
tmpfs:
- /run
- /tmp
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro

Note that centos:8 image contains a `seccomp security profile for Docker`_
which enables the use of systemd. When needed, such security profiles can be
reused (for example `the one available in Fedora`_):
When needed, such security profiles can be reused (for example
`the one available in Fedora`_):

.. code-block:: yaml

Expand Down Expand Up @@ -223,7 +221,7 @@ capabilities along with the same image, command, and volumes as shown in the

platforms:
- name: instance
image: centos:8
image: quay.io/centos/centos:stream8
command: /sbin/init
capabilities:
- SYS_ADMIN
Expand All @@ -237,11 +235,10 @@ with the same image and command as shown in the ``non-privileged`` example.

platforms:
- name: instance
image: centos:8
image: quay.io/centos/centos:stream8
command: /sbin/init
privileged: True

.. _`seccomp security profile for Docker`: https://docs.docker.com/engine/security/seccomp/
.. _`the one available in fedora`: https://src.fedoraproject.org/rpms/docker/raw/88fa030b904d7af200b150e10ea4a700f759cca4/f/seccomp.json
.. _`in a non-privileged container`: https://developers.redhat.com/blog/2016/09/13/running-systemd-in-a-non-privileged-container/
.. _`start the container with extended privileges`: https://blog.docker.com/2013/09/docker-can-now-run-within-docker/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ driver:
platforms:
- name: instance
{%- if cookiecutter.driver_name in ['containers', 'docker', 'podman'] %}
image: docker.io/pycontribs/centos:8
image: quay.io/centos/centos:stream8
pre_build_image: true
{%- endif %}
provisioner:
Expand Down
2 changes: 1 addition & 1 deletion src/molecule/data/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Molecule managed

{% if item.registry is defined %}
{% if item.registry is defined and '/' not in item.image %}
FROM {{ item.registry.url }}/{{ item.image }}
{% else %}
FROM {{ item.image }}
Expand Down
7 changes: 4 additions & 3 deletions src/molecule/data/validate-dockerfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@
# platforms supported as being managed by molecule/ansible, this does
# not mean molecule itself can run on them.
- image: alpine:edge
- image: centos:7
- image: centos:8
- image: quay.io/centos/centos:7
- image: quay.io/centos/centos:stream8
- image: ubuntu:latest
- image: debian:latest
tasks:

- name: create temporary dockerfiles
tempfile:
prefix: "molecule-dockerfile-{{ item.image }}"
# sanitize image name to be filename safe
prefix: "molecule-dockerfile-{{ item.image | regex_replace('\/', '-') }}"
suffix: build
register: temp_dockerfiles
with_items: "{{ platforms }}"
Expand Down