Skip to content

Commit fa95493

Browse files
authored
Replace centos:8 with centos:stream8 (#3431)
1 parent 7ae4cd4 commit fa95493

File tree

5 files changed

+15
-17
lines changed

5 files changed

+15
-17
lines changed

conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ def environ():
1717

1818
# adds extra environment variables that may be needed during testing
1919
if not os.environ.get("TEST_BASE_IMAGE", ""):
20-
os.environ["TEST_BASE_IMAGE"] = "docker.io/pycontribs/centos:8"
20+
os.environ["TEST_BASE_IMAGE"] = "quay.io/centos/centos:stream8"

docs/examples.rst

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ and ``Dockerfile.j2`` as follows.
2424
Append the following code block to the end of ``Dockerfile.j2``. It creates an
2525
``ansible`` user with passwordless sudo privileges.
2626

27-
The variable ``SUDO_GROUP`` depends on the target distribution. ``centos:8``
28-
uses ``wheel``.
27+
The variable ``SUDO_GROUP`` depends on the target distribution.
2928

3029
.. code-block:: docker
3130
@@ -45,7 +44,7 @@ Modify ``provisioner.inventory`` in ``molecule.yml`` as follows:
4544
4645
platforms:
4746
- name: instance
48-
image: centos:8
47+
image: quay.io/centos/centos:stream8
4948
#
5049
5150
.. code-block:: yaml
@@ -67,7 +66,7 @@ An example for a different platform instance name:
6766
6867
platforms:
6968
- name: centos8
70-
image: centos:8
69+
image: quay.io/centos/centos:stream8
7170
#
7271
7372
.. code-block:: yaml
@@ -179,17 +178,16 @@ and command as follows.
179178
180179
platforms:
181180
- name: instance
182-
image: centos:8
181+
image: quay.io/centos/centos:stream8
183182
command: /sbin/init
184183
tmpfs:
185184
- /run
186185
- /tmp
187186
volumes:
188187
- /sys/fs/cgroup:/sys/fs/cgroup:ro
189188
190-
Note that centos:8 image contains a `seccomp security profile for Docker`_
191-
which enables the use of systemd. When needed, such security profiles can be
192-
reused (for example `the one available in Fedora`_):
189+
When needed, such security profiles can be reused (for example
190+
`the one available in Fedora`_):
193191

194192
.. code-block:: yaml
195193
@@ -223,7 +221,7 @@ capabilities along with the same image, command, and volumes as shown in the
223221
224222
platforms:
225223
- name: instance
226-
image: centos:8
224+
image: quay.io/centos/centos:stream8
227225
command: /sbin/init
228226
capabilities:
229227
- SYS_ADMIN
@@ -237,11 +235,10 @@ with the same image and command as shown in the ``non-privileged`` example.
237235
238236
platforms:
239237
- name: instance
240-
image: centos:8
238+
image: quay.io/centos/centos:stream8
241239
command: /sbin/init
242240
privileged: True
243241
244-
.. _`seccomp security profile for Docker`: https://docs.docker.com/engine/security/seccomp/
245242
.. _`the one available in fedora`: https://src.fedoraproject.org/rpms/docker/raw/88fa030b904d7af200b150e10ea4a700f759cca4/f/seccomp.json
246243
.. _`in a non-privileged container`: https://developers.redhat.com/blog/2016/09/13/running-systemd-in-a-non-privileged-container/
247244
.. _`start the container with extended privileges`: https://blog.docker.com/2013/09/docker-can-now-run-within-docker/

src/molecule/cookiecutter/molecule/{{cookiecutter.role_name}}/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/molecule.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ driver:
66
platforms:
77
- name: instance
88
{%- if cookiecutter.driver_name in ['containers', 'docker', 'podman'] %}
9-
image: docker.io/pycontribs/centos:8
9+
image: quay.io/centos/centos:stream8
1010
pre_build_image: true
1111
{%- endif %}
1212
provisioner:

src/molecule/data/Dockerfile.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Molecule managed
22

3-
{% if item.registry is defined %}
3+
{% if item.registry is defined and '/' not in item.image %}
44
FROM {{ item.registry.url }}/{{ item.image }}
55
{% else %}
66
FROM {{ item.image }}

src/molecule/data/validate-dockerfile.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88
# platforms supported as being managed by molecule/ansible, this does
99
# not mean molecule itself can run on them.
1010
- image: alpine:edge
11-
- image: centos:7
12-
- image: centos:8
11+
- image: quay.io/centos/centos:7
12+
- image: quay.io/centos/centos:stream8
1313
- image: ubuntu:latest
1414
- image: debian:latest
1515
tasks:
1616

1717
- name: create temporary dockerfiles
1818
tempfile:
19-
prefix: "molecule-dockerfile-{{ item.image }}"
19+
# sanitize image name to be filename safe
20+
prefix: "molecule-dockerfile-{{ item.image | regex_replace('\/', '-') }}"
2021
suffix: build
2122
register: temp_dockerfiles
2223
with_items: "{{ platforms }}"

0 commit comments

Comments
 (0)