问题描述
基于func create创建的function的source code,并基于build创建出function对应的image。我们需在该image内创建安装iperf3。
解决步骤及遇到的errors
1. 查看本地的image,并运行该image
podman images
docker run -it -u root -p 10001:22 $target_image /bin/sh #进入镜像mindspore_hust:v5,同时将本机的1001端口映射到image的22端口
注意:这里一定要添加-u root(默认root用户没有密码);如果不指定,后续调用dnf install iperf3安装时会提示要使用root的超级权限。
2. 成功进入image后,安装iperf3
dnf update
dnf install iperf3
详细安装及使用内容参见卡片0
iperf安装Installing iperf on Red Hat Enterprise Linux 8 using dnf, testing network bandwidth to and from the system.https://linuxconfig.org/how-to-install-iperf-on-redhat-8
直接安装iperf3时会抛出 Error: Unable to find a match: iperf3。为了解决该问题,需要先在redhat上进行注册(卡片2),获取username及password;然后对os进行subscription(卡片1),后者需要redhat的注册信息。上述两个步骤完成后便可正常安装iperf3。
首次执行 subscription-manager register,会抛出 subscription-manager is disabled when running inside a container. please refer to your host system for subscription management,该问题的解决办法是 从容器中删掉 "/etc/rhsm-host" (详见卡片3)。
Enable Subscription Management repositories on Redhat 8 Linux - Linux Tutorials - Learn Linux ConfigurationAfter installation of RHEL 8, Linux package repositories need to be enabled before you are able to install new packages. Any attempt to install new software will result with the following error message:https://linuxconfig.org/enable-subscription-management-repositories-on-redhat-8-linuxHybrid Cloud Developer Tutorials and Software from Red Hat | Red Hat DeveloperJoin Red Hat Developer for the software and tutorials to develop hybrid cloud applications using Kubernetes, microservices, serverless and Linux.https://developers.redhat.com/Hybrid Cloud Developer Tutorials and Software from Red Hat | Red Hat DeveloperJoin Red Hat Developer for the software and tutorials to develop hybrid cloud applications using Kubernetes, microservices, serverless and Linux.https://developers.redhat.com/