如何解决使用ubi的docker builder映像
尝试使用ibmcom / websphere-liberty:full-java8-ibmjava-ubi(RHEL8.2)作为构建器映像,并尝试安装ant但没有成功
[root@d68aa2dcc111 /]# yum -y install ant
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:26:00 ago on Tue Aug 25 21:01:43 2020.
No match for argument: ant
Error: Unable to find a match: ant```
解决方法
您可以使用以下命令通过“ wget”安装获取二进制文件:
ENV ANT_VERSION=1.10.8
RUN wget http://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz \
&& tar xvfvz apache-ant-${ANT_VERSION}-bin.tar.gz -C /opt \
&& ln -sfn /opt/apache-ant-${ANT_VERSION} /opt/ant \
&& sh -c 'echo ANT_HOME=/opt/ant >> /etc/environment' \
&& ln -sfn /opt/ant/bin/ant /usr/bin/ant \
&& rm apache-ant-${ANT_VERSION}-bin.tar.gz
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。