1

我已经建立了一个容器:

> cat Dockerfile
FROM fedora:latest

USER root

RUN dnf update -y && \
    dnf clean all && \
    dnf autoremove

> docker build -t dev .
> docker run -t -d <container_id>
> docker exec -it <container_id> /bin/bash
$ dnf install -y which
$ which find
which: no find in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)

到目前为止,我使用过的每个 Linux 发行版都已find预先安装,所以我不完全确定在这里做什么。

快速的谷歌搜索会产生关于如何使用 find的结果,或者为什么在脚本中使用时找不到它bash等。但无论我使用什么关键字,我似乎都找不到以前遇到过这个问题的人.

dnf search find没有显示任何结果,但也许它使用了另一个名称?还是我必须自己编译?

4

1 回答 1

5
# dnf whatprovides '*/bin/find'
findutils-1:4.6.0-24.fc31.x86_64 : The GNU versions of find utilities (find and xargs)
Repo        : @System
Matched from:
Filename    : /usr/bin/find

findutils-1:4.6.0-24.fc31.x86_64 : The GNU versions of find utilities (find and xargs)
Repo        : fedora
Matched from:
Filename    : /usr/bin/find
# dnf install -y findutils
于 2020-02-06T03:03:35.660 回答