当前位置:   article > 正文

修改knative func build的image_subscription-manager is disabled when running insi

subscription-manager is disabled when running inside a container. please ref

问题描述

在基于knative func创建出的function内创建安装iperf3

解决步骤及遇到的errors

1. 查看本地的image,并运行该image

  1. podman images
  2. 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

  1. dnf update
  2. dnf install iperf3

详细安装及使用内容参见卡片0

iperf安装Installing iperf on Red Hat Enterprise Linux 8 using dnf, testing network bandwidth to and from the system.icon-default.png?t=N7T8https://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:icon-default.png?t=N7T8https://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.icon-default.png?t=N7T8https://developers.redhat.com/Subscription Manager - Red Hat Customer PortalHI, Please I got below error when I want to login: subscription-manager is disabled when running inside a container. Please refer to your host system for subscription management. Thank you in advice.icon-default.png?t=N7T8https://access.redhat.com/discussions/5889431

具体名命令如下:

  1. # 运行image
  2. podman run -it -u root -p 10001:22 network-intensive:v1 /bin/sh
  3. dnf udpate
  4. # remove /etc/rhsm-host, 否则会抛出subscription-manager is disabled when running inside a #container. Please refer to your host system for subscription management.
  5. mv /etc/rhsm-host /etc/rhsm-host-bk
  6. # 注册red hat
  7. #enable subscription
  8. subscription-manager register
  9. subscription-manager list --available #记录这里生成的pool id
  10. subscription-manager attach --pool=2c94ed35887328c20188ad50675e2ac1
  11. subscription-manager list
  12. dnf repolist
  13. subscription-manager repos --list
  14. #install iperf3
  15. dnf install iperf3

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/913149?site
推荐阅读
相关标签
  

闽ICP备14008679号