【发布时间】:2018-06-05 15:31:20
【问题描述】:
我可以看到microsoft/dotnet 中没有 Powershell:
C:\> docker run -it microsoft/dotnet:2.1-sdk bash
root@5397dac12c1e:/# pwsh
bash: pwsh: command not found
当我尝试以受PowerShell dockerfiles 启发的以下方式添加它时:
FROM microsoft/dotnet:2.1-sdk
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils ca-certificates curl apt-transport-https locales && rm -rf /var/lib/apt/lists/*
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | tee /etc/apt/sources.list.d/microsoft.list
RUN apt-get update && apt-get install -y --no-install-recommends powershell
...步骤RUN [...] apt-get install [...] powershell 失败
Fetched 10.3 MB in 11s (914 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
powershell : Depends: libssl1.0.0 but it is not installable
Depends: libicu55 but it is not installable
E: Unable to correct problems, you have held broken packages.
我想尝试在 Debian Stretch 容器中使用 Ubuntu 方法太大胆了。我想知道是否有更简单的方法来获取同时存在 dotnet-sdk 和 pwsh 的容器。
【问题讨论】:
标签: docker .net-core powershell-core