LoginSignup
3
0

Dockerfileでのdnf updateに失敗する場合

Posted at

Dockerfile内でdnf updateを実行したところ下記エラー

Failed to download metadata for repo 'appstream': Cannot ...

こちらの通りに実施し解決

FROM centos

RUN cd /etc/yum.repos.d/
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 dnf -y update
3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0