Docker初心者です。
環境
MacOS 11.2.3
Docker 20.10.6
#Docker for Macバージョン
Client: Cloud integration: 1.0.14 Version: 20.10.6 API version: 1.41 Go version: go1.16.3 Git commit: 370c289 Built: Fri Apr 9 22:46:57 2021 OS/Arch: darwin/arm64 Context: default Experimental: true Server: Docker Engine - Community Engine: Version: 20.10.6 API version: 1.41 (minimum version 1.12) Go version: go1.13.15 Git commit: 8728dd2 Built: Fri Apr 9 22:44:13 2021 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.4.4 GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e runc: Version: 1.0.0-rc93 GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec docker-init: Version: 0.19.0 GitCommit: de40ad0
質問
下記Dockefile内でyum -y install httpdを実行中に、404エラーが出てしまいました。
FROM centos:7 RUN yum update -y RUN yum install -y sudo RUN yum install -y epel-release RUN yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm RUN yum clean all RUN yum clean metadata RUN yum -y install wget RUN yum -y install httpd RUN yum -y install --enablerepo=remi,remi-php73 php php-mbstring php-pdo php-gd php-xml php-mcrypt php-mysql composer RUN yum install -y http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-1.noarch.rpm RUN yum install -y git CMD ["/usr/sbin/httpd", "-DFOREGROUND"]
エラー
Building web [+] Building 158.3s (10/14) => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 120B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/centos:7 2.2s => [ 1/11] FROM docker.io/library/centos:7@sha256:0f4ec88e21daf75124b8a9 0.0s => CACHED [ 2/11] RUN yum update -y 0.0s => CACHED [ 3/11] RUN yum install -y sudo 0.0s => CACHED [ 4/11] RUN yum install -y epel-release 0.0s => CACHED [ 5/11] RUN yum install -y http://rpms.famillecollet.com/enter 0.0s => CACHED [ 6/11] RUN yum clean all 0.0s => ERROR [ 7/11] RUN yum -y install wget 156.0s ------ > [ 7/11] RUN yum -y install wget: #10 0.325 Loaded plugins: fastestmirror, ovl #10 0.420 Determining fastest mirrors #10 24.19 * base: ftp.yz.yamagata-u.ac.jp #10 24.19 * epel: nrt.edge.kernel.org #10 24.19 * extras: ftp.yz.yamagata-u.ac.jp #10 24.19 * remi-safe: ftp.riken.jp #10 24.20 * updates: ftp.yz.yamagata-u.ac.jp #10 25.51 https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found #10 25.51 Trying other mirror. #10 25.51 To address this issue please refer to the below wiki article #10 25.51 #10 25.51 https://wiki.centos.org/yum-errors #10 25.51 #10 25.51 If above article doesn't help to resolve this issue please use https://bugs.centos.org/. #10 25.51 #10 25.80 http://ftp.riken.jp/Linux/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found #10 25.80 Trying other mirror. [略] #10 156.0 http://mirror.innosol.asia/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.innosol.asia/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: (28, 'Connection timed out after 30005 milliseconds') #10 156.0 http://remi.xpg.com.br/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: remi.xpg.com.br; Unknown error" ------ executor failed running [/bin/sh -c yum -y install wget]: exit code: 1 ERROR: Service 'web' failed to build : Build failed
検証したこと・実現したいこと
404エラーが出ているページにアクセスしたところ、やはり404エラーになっておりました。http://ftp.riken.jp/Linux/remi/enterprise/7/safe/aarch64/repodata/repomd.xml
正しいページはこちらのようです。
http://ftp.riken.jp/Linux/remi/enterprise/7/safe/x86_64/repodata/
おそらく、参照しているURLが古いままになっているようなので、ここを設定し直すことで解決できるのでは・・?
と思っていますが、解決できる方法があれば教えてきただけると助かります。
Linuxの知識不足もあり解決に時間がかかっております。
補足
Dockefile内の下記記述を修正し実行したがエラーは解消されず。
#FROM centos:7 FROM --platform=linux/x86_64 centos:7
エラー内容
------ > [ 8/12] RUN yum -y install wget: #11 0.731 Loaded plugins: fastestmirror, ovl #11 1.125 Determining fastest mirrors #11 2.624 #11 2.624 #11 2.624 One of the configured repositories failed (Unknown), #11 2.624 and yum doesn't have enough cached data to continue. At this point the only #11 2.624 safe thing yum can do is fail. There are a few ways to work "fix" this: #11 2.624 #11 2.624 1. Contact the upstream for the repository and get them to fix the problem. #11 2.624 #11 2.624 2. Reconfigure the baseurl/etc. for the repository, to point to a working #11 2.624 upstream. This is most often useful if you are using a newer #11 2.624 distribution release than is supported by the repository (and the #11 2.624 packages for the previous distribution release still work). #11 2.624 #11 2.624 3. Run the command with the repository temporarily disabled #11 2.624 yum --disablerepo=<repoid> ... #11 2.624 #11 2.624 4. Disable the repository permanently, so yum won't use it by default. Yum #11 2.624 will then just ignore the repository until you permanently enable it #11 2.624 again or use --enablerepo for temporary usage: #11 2.624 #11 2.624 yum-config-manager --disable <repoid> #11 2.624 or #11 2.624 subscription-manager repos --disable=<repoid> #11 2.624 #11 2.624 5. Configure the failing repository to be skipped, if it is unavailable. #11 2.624 Note that yum will try to contact the repo. when it runs most commands, #11 2.624 so will have to try and fail each time (and thus. yum will be be much #11 2.624 slower). If it is a very temporary problem though, this is often a nice #11 2.624 compromise: #11 2.624 #11 2.624 yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true #11 2.624 #11 2.624 Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/05/24 04:58
2021/05/24 05:13
2021/05/24 06:20
2021/05/24 06:36
2021/05/24 07:25
2021/05/24 07:52
2021/05/24 08:27
2021/05/24 09:06
2021/05/24 09:19
2021/05/24 11:18
2021/05/25 00:56
2021/05/25 02:05
2021/05/25 06:18
2021/05/25 08:42
2021/05/27 05:01