首页 > 解决方案 > 错误:无法在 docker-dr-elephant 构建中找到匹配项

问题描述

我正在测试 dr-elephant :

https://github.com/damienclaveau/docker-dr-elephant

但是当我运行时:

docker build -t dr-elephant:2.0.6 .

我越来越

Complete!
Last metadata expiration check: 0:00:19 ago on Thu Oct 24 07:51:21 2019.
No match for argument: krb5-auth-dialog
No match for argument: pam_krb5
Error: Unable to find a match
The command '/bin/sh -c yum install -y wget git unzip zip which  && yum install -y krb5-server krb5-libs krb5-workstation  && yum install -y krb5-auth-dialog pam_krb5  && yum install -y openssh-server openssh-clients  && yum clean all' returned a non-zero code: 1

关于如何解决这个问题的任何想法?

谢谢

标签: docker

解决方案


错误就在那里:yum无法安装名为pam_krb5和的软件包krb5-auth-dialog

您可以通过运行centos映像来轻松测试它并尝试安装这些软件包:

[root@228fcb9e4c19 /]# yum install -y krb5-auth-dialog pam_krb5
Failed to set locale, defaulting to C
CentOS-8 - AppStream                                                                                                                                                                                                                            1.1 MB/s | 6.0 MB     00:05
CentOS-8 - Base                                                                                                                                                                                                                                 2.0 MB/s | 7.9 MB     00:03
CentOS-8 - Extras                                                                                                                                                                                                                               634  B/s | 2.1 kB     00:03
No match for argument: krb5-auth-dialog
No match for argument: pam_krb5
Error: Unable to find a match

关于如何解决这个问题......您可以尝试删除该行(Dockerfile 中的第 9 行),但是您如何知道应用程序是否需要这些包?所以你最好的办法是联系所有者并告诉他他的 Dockerfile 不再工作(它已经 2 岁了)。

通常出现此问题是因为基础映像没有固定版本。你可以查看它的 using FROM centos:latest,但今天的 centos 与两年前的 centos 不一样。您也可以尝试编辑基本映像的标签并使用较旧的 centos 版本,它可能会或可能不会工作。


推荐阅读