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

General support questions
Post Reply
rodphoenix
Posts: 2
Joined: 2024/02/02 13:01:31

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

Post by rodphoenix » 2024/02/02 13:11:00

My CentOS Linux release 7.9.2009 (Core), docker version 1.13.1, docker-compose version 1.23.2
I create docker-compose.yml,like follows:
[root@master demo]# more docker-compose.yml
version: '3'
services:
db:
image: centos
command: >
/bin/bash -c '
yum install nc -y;
'

Then I run docker-compose up,like follows:
[root@master demo]# docker-compose up
Starting demo_db_1 ... done
Starting demo_web_1 ... done
Attaching to demo_db_1, demo_web_1
demo_web_1 exited with code 0
db_1 | CentOS Linux 8 - AppStream 84 B/s | 38 B 00:00
db_1 | Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
db_1 | /bin/bash: nc: command not found
db_1 | sleep over
demo_db_1 exited with code 127
[root@master demo]#

Why raise Error? This error puzzled me for a whole day! How to correct it? Thanks

User avatar
jlehtone
Posts: 4532
Joined: 2007/12/11 08:17:33
Location: Finland

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

Post by jlehtone » 2024/02/02 19:51:24

The 'appstream' repo is not for CentOS 7. You can use only repos that are for "el7".

Post Reply