Public key for mysql-community-client-plugins-8.0.36-1.el7.x86_64.rpm is not installed

下記を実行すると

RUN yum install -y mysql-community-server

エラーメッセージがでました

Public key for mysql-community-client-8.0.36-1.el7.x86_64.rpm is not installed

下記を実行すると

RUN yum install -y php-mysql

エラーメッセージがでました

Public key for mysql-community-client-plugins-8.0.36-1.el7.x86_64.rpm is not installed

検索しました

https://qiita.com/Code_Dejiro/items/c97c400b92a85dce4468

結果として、下記を実行したら上手くいった。

追記しました

RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2023

うまくいきました。ありがとうございます。

エラー

9.471 Loaded plugins: fastestmirror, ovl
9.606 Determining fastest mirrors
20.84  * base: mirror.aktkn.sg
20.85  * epel: mirrors.bfsu.edu.cn
20.85  * extras: mirrors.qlu.edu.cn
20.85  * updates: mirrors.cqu.edu.cn
36.70 Resolving Dependencies
36.70 --> Running transaction check
36.70 ---> Package mysql-community-server.x86_64 0:8.0.36-1.el7 will be installed
36.73 --> Processing Dependency: mysql-community-common(x86-64) = 8.0.36-1.el7 for package: mysql-community-server-8.0.36-1.el7.x86_64
37.03 --> Processing Dependency: mysql-community-icu-data-files = 8.0.36-1.el7 for package: mysql-community-server-8.0.36-1.el7.x86_64
37.04 --> Processing Dependency: mysql-community-client(x86-64) >= 8.0.11 for package: mysql-community-server-8.0.36-1.el7.x86_64
37.07 --> Processing Dependency: libnuma.so.1(libnuma_1.1)(64bit) for package: mysql-community-server-8.0.36-1.el7.x86_64
37.07 --> Processing Dependency: libnuma.so.1(libnuma_1.2)(64bit) for package: mysql-community-server-8.0.36-1.el7.x86_64
37.07 --> Processing Dependency: net-tools for package: mysql-community-server-8.0.36-1.el7.x86_64
37.07 --> Processing Dependency: libnuma.so.1()(64bit) for package: mysql-community-server-8.0.36-1.el7.x86_64
37.07 ---> Package php-mysql.x86_64 0:5.4.16-48.el7 will be installed
37.08 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4.16-48.el7.x86_64
37.11 --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.4.16-48.el7.x86_64
37.11 --> Running transaction check
37.11 ---> Package mysql-community-client.x86_64 0:8.0.36-1.el7 will be installed
37.12 --> Processing Dependency: mysql-community-client-plugins = 8.0.36-1.el7 for package: mysql-community-client-8.0.36-1.el7.x86_64
37.13 --> Processing Dependency: mysql-community-libs(x86-64) >= 8.0.11 for package: mysql-community-client-8.0.36-1.el7.x86_64
37.16 ---> Package mysql-community-common.x86_64 0:8.0.36-1.el7 will be installed
37.16 ---> Package mysql-community-icu-data-files.x86_64 0:8.0.36-1.el7 will be installed
37.16 ---> Package mysql-community-libs-compat.x86_64 0:8.0.36-1.el7 will be installed
37.16 ---> Package net-tools.x86_64 0:2.0-0.25.20131004git.el7 will be installed
37.16 ---> Package numactl-libs.x86_64 0:2.0.12-5.el7 will be installed
37.16 --> Running transaction check
37.16 ---> Package mysql-community-client-plugins.x86_64 0:8.0.36-1.el7 will be installed
37.17 ---> Package mysql-community-libs.x86_64 0:8.0.36-1.el7 will be installed
37.24 --> Finished Dependency Resolution
37.29
37.29 Dependencies Resolved
37.29
37.29 ================================================================================
37.29  Package                        Arch   Version          Repository         Size
37.29 ================================================================================
37.29 Installing:
37.29  mysql-community-server         x86_64 8.0.36-1.el7     mysql80-community  64 M
37.29  php-mysql                      x86_64 5.4.16-48.el7    base              102 k
37.29 Installing for dependencies:
37.29  mysql-community-client         x86_64 8.0.36-1.el7     mysql80-community  16 M
37.29  mysql-community-client-plugins x86_64 8.0.36-1.el7     mysql80-community 3.5 M
37.29  mysql-community-common         x86_64 8.0.36-1.el7     mysql80-community 665 k
37.29  mysql-community-icu-data-files x86_64 8.0.36-1.el7     mysql80-community 2.2 M
37.29  mysql-community-libs           x86_64 8.0.36-1.el7     mysql80-community 1.5 M
37.29  mysql-community-libs-compat    x86_64 8.0.36-1.el7     mysql80-community 669 k
37.29  net-tools                      x86_64 2.0-0.25.20131004git.el7
37.29                                                         base              306 k
37.29  numactl-libs                   x86_64 2.0.12-5.el7     base               30 k
37.29
37.29 Transaction Summary
37.29 ================================================================================
37.29 Install  2 Packages (+8 Dependent packages)
37.29
37.29 Total download size: 89 M
37.29 Installed size: 420 M
37.29 Downloading packages:
38.18 warning: /var/cache/yum/x86_64/7/mysql80-community/packages/mysql-community-client-plugins-8.0.36-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID a8d3785c: NOKEY
38.18 Public key for mysql-community-client-plugins-8.0.36-1.el7.x86_64.rpm is not installed
46.20 --------------------------------------------------------------------------------
46.20 Total                                               10 MB/s |  89 MB  00:08
46.20 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
46.21 Importing GPG key 0x3A79BD29:
46.21  Userid     : "MySQL Release Engineering <mysql-build@oss.oracle.com>"
46.21  Fingerprint: 859b e8d7 c586 f538 430b 19c2 467b 942d 3a79 bd29
46.21  Package    : mysql80-community-release-el7-9.noarch (@/mysql80-community-release-el7-9.noarch)
46.21  From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
46.24 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
46.24 Importing GPG key 0x5072E1F5:
46.24  Userid     : "MySQL Release Engineering <mysql-build@oss.oracle.com>"
46.24  Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5
46.24  Package    : mysql80-community-release-el7-9.noarch (@/mysql80-community-release-el7-9.noarch)
46.24  From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
46.26
46.26
46.26 Public key for mysql-community-client-8.0.36-1.el7.x86_64.rpm is not installed
46.26
46.26
46.26  Failing package is: mysql-community-client-8.0.36-1.el7.x86_64
46.26  GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
46.26
------
failed to solve: process "/bin/sh -c yum -y remove mariadb-server mariadb-libs mariadb     && yum localinstall -y https://dev.mysql.com/get/mysql80-community-release-el7-9.noarch.rpm     && yum install -y mysql-community-server php-mysql" did not complete successfully: exit code: 1