Bug 8097 - Using 'FROM centos:8' in containers is deprecated
Summary: Using 'FROM centos:8' in containers is deprecated
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Automatic tests (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.15.0
Assignee: Linn
URL:
Keywords: aleze_tester, prosaic
Depends on:
Blocks:
 
Reported: 2023-02-14 14:09 CET by Linn
Modified: 2023-03-08 13:05 CET (History)
1 user (show)

See Also:
Acceptance Criteria:
* Make sure the autotests can run without using cached data


Attachments

Description Linn cendio 2023-02-14 14:09:23 CET
When setting up the container for running the autotests, the following error is shown:

> [tester@linma ~]$ ./autotests/runtests.sh tl-4.14.0post_0.unknown-server.zip 
> + podman build --tag autotests -f container/Containerfile
> STEP 1/7: FROM centos:8
> ...
> STEP 3/7: RUN dnf -y install centos-release-stream
> CentOS Linux 8 - AppStream                       64  B/s |  38  B     00:00    
> Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
> Error: building at STEP "RUN dnf -y install centos-release-stream": while running runtime: exit status 1
This seems to be because CentOS 8 has reached end of life and the download mirrors have changed URLs.

There is another image called centos:stream8 that can be used in place of centos:8. I tested and it worked fine. Another advantage of using centos:stream8 is that these lines in file Containerfile can be removed as the systemd bugs have been solved:
> # And buggy systemd
> # https://bugzilla.redhat.com/show_bug.cgi?id=1901449
> RUN dnf -y install centos-release-stream
> RUN dnf -y upgrade systemd*
Note that CentOS stream 8 is planned to reach end of life in May 2024 [1], so for a more robust solution we might want to switch platforms. 

[1]: https://endoflife.date/centos
Comment 1 Linn cendio 2023-02-14 14:13:55 CET
Also note that to successfully install ThinLinc in the container, I had to update the answer file to allow installation of required libraries.
> install-required-libs=yes
It seems to work fine after that, but it could be good to take an extra look at the other values in the answer file as well.
Comment 5 Linn cendio 2023-03-01 13:54:47 CET
Tested by running autotests locally, and they could successfully run without using any caching.

Also looked through the answer file, but did not see anything that looked out of place there.

There is one container file that still uses centos:8, but this is a dockerfile from TigerVNC that has already been updated upsteam.
Comment 6 Linn cendio 2023-03-01 15:00:35 CET
I was a bit too quick when changing the answer file to install required ThinLinc libraries. We don't want to install additional packages in this state of the tests, since we don't want the tests to rely on having network access.

Instead, the packages ThinLinc require should be installed when setting up the container.
Comment 8 Linn cendio 2023-03-01 15:29:17 CET
The autotests still run and pass when manually installing the Thinlinc packages, marking as resolved.
Comment 10 Alexander Zeijlon cendio 2023-03-08 13:05:18 CET
Verified in comment 9.

Note You need to log in before you can comment on or make changes to this bug.