如何在运行 openjdk:17-oracle 的容器中安装 xargs

Kur*_*rru 4 java containers oracle-linux

我正在尝试在运行 openjdk:17-oracle 的容器中安装 xargs,但我无法确定此映像中存在什么包管理器。

FROM openjdk:17-oracle
RUN apt-get install findutils
Run Code Online (Sandbox Code Playgroud)

抛出错误:

 => ERROR [stage-1 4/4] RUN apt-get install findutils                                                                      0.5s
------
 > [stage-1 4/4] RUN apt-get install findutils:
#13 0.395 /bin/sh: apt-get: command not found
-
Run Code Online (Sandbox Code Playgroud)

yum install findutils和其他几个一样。

我需要 xargs,因为 gradle 运行程序使用它来为我的 java 进程构建“执行”命令。

Ger*_*der 7

它没有真正记录下来,但我在基于 Oracle Linux 的映像的Oracle 映像的问题跟踪器中发现了这一点:

RUN microdnf install findutils
Run Code Online (Sandbox Code Playgroud)

对于基于 Alpine 的图像,命令为:

RUN apk update && apk add findutils
Run Code Online (Sandbox Code Playgroud)