我想在docker文件上添加OpenShift CLI 4.6的下载和安装步骤。我已经添加了以下行,但不起作用。
RUN curl -L https://github.com/openshift/okd/releases/download/4.6.0-0.okd-2021-02-14-205305/openshift-client-linux-4.6.0-0.okd-2021-02-14-205305.tar.gz \
| tar xz && install openshift-client-linux-4.6.0-0.okd-2021-02-14-205305.tar.gz /usr/bin/oc && rm -rf openshift*
字符串
但我得到以下错误
tar (child): openshift-client-linux-4.6.0-0.okd-2021-02-14-205305.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
% Total % Received % Xferd Average Speed Time Time Time
型
电流
curl:(23)写入正文失败(1354!= 1371)
2条答案
按热度按时间az31mfrm1#
curl -L https://github.com/openshift/okd/releases/download/4.6.0-0.okd-2021-02-14-205305/openshift-client-linux-4.6.0-0.okd-2021-02-14-205305.tar.gz | tar xz
将解压缩tarball中的文件,所以最后,该文件夹中的文件将是下一个:字符串
你可以看到没有
openshift-client-linux-4.6.0-0.okd-2021-02-14-205305.tar.gz
在那里,如果你真的需要它,你需要做的下一个:curl -L https://github.com/openshift/okd/releases/download/4.6.0-0.okd-2021-02-14-205305/openshift-client-linux-4.6.0-0.okd-2021-02-14-205305.tar.gz -O
将其写入文件夹。os8fio9y2#
将此添加到您的Dockerfile:
字符串