RHEL 7 LinuxサーバーにDockerをインストールするときに発生する問題

RHEL 7 LinuxサーバーにDockerをインストールするときに発生する問題

私は最近この問題にますます直面し、完全に詰まって助けが必要になりました。

私はRHEL EC2 LinuxサーバーにアクセスしてDockerをインストールしようとしました。最近では、このプロセスは非常に痛いです。オンラインで言及されたプロセスに従おうとすると、多くの404 HTTPが見つかりませんエラーが発生する

~によるとhttps://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html、次の2つのコマンドのいずれかを簡単に実行できます。

  • sudo amazon-linux-extrasインストールドッカー
  • sudo yumドッカーのインストール

ただし、以下の出力に示すように、これらのコマンドのいずれも機能しません。

[root@d8de679d27f2454 myuser]# sudo amazon-linux-extras install docker
sudo: amazon-linux-extras: command not found
[root@d8de679d27f2454 myuser]# yum install docker
Loaded plugins: amazon-id, search-disabled-repos
No package docker available.
Error: Nothing to do
[root@d8de679d27f2454 myuser]#

私が試した作業のリストは次のとおりです。

最初の試み(について:https://stackoverflow.com/questions/53918841/how-to-install-docker-on-amazon-linux2)

2番目の提案された答えは、次のコマンドを実行できることです。

sudo yum update -y
sudo yum -y install docker

ただし、以下の出力に示すように、この方法は機能しません。

[root@d8de679d27f2454 myuser]# yum update -y
Loaded plugins: amazon-id, search-disabled-repos
No packages marked for update
[root@d8de679d27f2454 myuser]# yum -y install docker
Loaded plugins: amazon-id, search-disabled-repos
No package docker available.
Error: Nothing to do
[root@d8de679d27f2454 myuser]# 

2回目の試み:インストールが完了しました。get.docker.com

実行中はcurl https://get.docker.com | bash動作しません。

ここに画像の説明を入力してください。

3回目の試み:https://computingforgeeks.com/install-docker-ce-on-rhel-7-linux/

この資料の一部では、次の 2 つのコマンドを実行することをお勧めします。

sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y yum-utils device-mapper-persistent-data lvm2

しかし、これも動作しません。

# yum install -y yum-utils device-mapper-persistent-data lvm2
Loaded plugins: amazon-id, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article 

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.



 One of the configured repositories failed (Docker CE Stable - x86_64),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=docker-ce-stable ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable docker-ce-stable
        or
            subscription-manager repos --disable=docker-ce-stable

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=docker-ce-stable.skip_if_unavailable=true

failure: repodata/repomd.xml from docker-ce-stable: [Errno 256] No more mirrors to try.
https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

cat /etc/os-releaseこれは私のコマンドの結果です。

NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.9 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

どんな助けでも大変感謝します。現時点では、dockerのインストールはほとんど不可能に見えます。

ベストアンサー1

/etc/yum.repos.d/のrepoファイルを次のファイルに置き換えます。

https://download.docker.com/linux/centos/docker-ce.repo

ダウンロードしたバージョンはs390xシステムを実行するためにのみ適しています。 Dockerは人々をいつも混乱させているyumリポジトリを構築する方法について少し愚かです。

証拠:カタログを参照してくださいrhel/7 ディレクトリに比べてcentos/7 ディレクトリ。 rhelディレクトリにはs390xとソースコードのみが含まれていますが、CentOSにはパッケージとストレージメタデータを含むx86_64ディレクトリがあります。

おすすめ記事