Docker issue: I am getting the below error,Need help

I am getting below error.

[root@ip-172-31-21-196 webserver]# docker build -t flaskapp .

Sending build context to Docker daemon 93.7kB

Step 1/8 : FROM centos:latest

—> 5d0da3dc9764

Step 2/8 : RUN yum -y install python3

—> Running in 24f2a82aaed0

CentOS Linux 8 - AppStream 391 B/s | 38 B 00:00

Error: Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist

The command ‘/bin/sh -c yum -y install python3’ returned a non-zero code: 1

------ Another error --------------

Hi,

Fix Failed to download metadata for repo

CentOS Linux 8 had reached the End Of Life (EOL) on December 31st, 2021. It means that CentOS 8 will no longer receive development resources from the official CentOS project. After Dec 31st, 2021, if you need to update your CentOS, you need to change the mirrors to vault.centos.org where they will be archived permanently. Alternatively, you may want to upgrade to CentOS Stream.

Step 1: Go to the /etc/yum.repos.d/ directory.

cd /etc/yum.repos.d/

Step 2: Run the below commands

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*

sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

Step 3: Now run the yum update

yum update -y

That’s it!