我的 Azure Pipelines 构建在 CmdLine 阶段失败Error response from daemon: Container 6c04267ea73602db828802df820c5c33cf95223ad0dcd0e3ef73b545d51f3bfa is not running。
我的azure-pipelines.yml是:
pool:
vmImage: windows-2019
container: my-docker-container
steps:
- script: |
echo 'run build script'
Run Code Online (Sandbox Code Playgroud)
forDockerfile是my-docker-container:
FROM mcr.microsoft.com/windows/servercore:1809
# Do stuff
ENTRYPOINT ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
Run Code Online (Sandbox Code Playgroud)
我需要修复什么才能解决此错误?
ENTRYPOINT [...]从 中删除该行Dockerfile。构建管道需要ENTRYPOINT是cmd.exe;我不知道为什么。
您可以包含SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]在其中Dockerfile,并且不会影响构建。
要在管道中运行 Powershell 脚本,请更改- script为- powershell.
| 归档时间: |
|
| 查看次数: |
2193 次 |
| 最近记录: |