docker - 无法安装核心 powershell 模块且未输出错误
问题描述
我正在尝试更改 Windows docker 容器中的权限,以在 dockerfile 中授予管理员访问权限,以便它可以运行一些 powershell 脚本。为了做到这一点,我使用了一些在 microsoft.powershell.localaccounts 核心模块中找到的命令,我发现这些命令可以在基本映像中工作,该基本映像安装了该模块的 powershell 版本,但遗憾的是基本映像我'm current using 没有它,出于尺寸原因我需要使用此版本。
我已经尝试通过powershell在windows docker容器中运行这条线,但是虽然它似乎运行正常,打印出来没有问题,但它仍然没有安装。
Find-Module -Name microsoft.powershell.localaccounts | Install-Module -SkipPublisherCheck
解决方案
推荐阅读
- java - 嵌套异常是 java.lang.IllegalArgumentException:参数值 [2020-04-20] 与预期类型不匹配 [java.util.Date (n/a)]]
- eclipse - eclipse中的Scala安装
- r - 在 R 的 geom_line 中添加标签
- apache-superset - 在 apache 超集中为表着色
- jmeter - Http Request 中 CSV 数据集配置中的共享模式
- dynamics-crm - Business Central Dynamics 365 Sales Connection Setup 项目、机会、资源和其他的同步队列中的错误
- c# - LiteDB 5 System.IO.IOException:进程无法访问文件
- javascript - 如何防止 react-spring 在每次状态更改时启动动画?
- html - 您如何删除 chatango 聊天 X 按钮?
- redux - 在 useEffect 中调用调度?