Docker Container

3 / 6
INSTRUCTIONS

While creating docker file as mentioned in the tutorial, you may get an error such as:

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

That error arises because CentOS reached End of Life, and it is archived permanently. So, we need to use vault url for CentOS. Use the following code in your Dockerfile to resolve it-

FROM centos:8

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

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

RUN yum -y install python3


Loading comments...