microsoft / dotnet-framework-docker

The repo for the official docker images for .NET Framework on Windows Server Core.
https://hub.docker.com/_/microsoft-dotnet-framework
MIT License
714 stars 335 forks source link

powershell command hangs with the base image from .NET Framework 4.8 #1154

Closed sajis997 closed 3 months ago

sajis997 commented 3 months ago

Discussed in https://github.com/microsoft/dotnet-framework-docker/discussions/1153

Originally posted by **sajis997** August 2, 2024 I have a Azure Windows VM (Windows Server 2022 DataCenter) with Docker CE installed with the following configuration: Client: Version: 27.1.1 API version: 1.46 Go version: go1.21.12 Git commit: 6312585 Built: Tue Jul 23 19:57:57 2024 OS/Arch: windows/amd64 Context: desktop-windows Server: Docker Desktop 4.33.1 (161083) Engine: Version: 27.1.1 API version: 1.46 (minimum version 1.24) Go version: go1.21.12 Git commit: cc13f95 Built: Tue Jul 23 19:56:46 2024 OS/Arch: windows/amd64 Experimental: false I am trying to create a build pipeline for solution / project based on .NET Framework 4.8 and the build.dockerfile contains the following among others: `FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 AS build ARG PACKAGE_VERSION WORKDIR /V5FrameworkDiagnosticsBuild COPY . ./ SHELL ["powershell", "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command"] RUN Write-Output 'Starting PowerShell version check...'; $PSVersionTable.PSVersion; Write-Output 'PowerShell version check completed.' RUN Write-Output 'Listing directory contents...'; Get-ChildItem -Path .; Write-Output 'Directory listing completed.' ....................................` While initiating the build.dockerfile from Github Actions workflow as follows: - name: Build inside a Docker Container run: docker build --build-arg PACKAGE_VERSION=${{ env.PACKAGE_VERSION }} --no-cache -t frameworkdiagcr01 -f .\build.dockerfile . shell: pwsh It hangs at the poweshell command inside the dockerfile and eventually gives the following error message: Step 7/11 : RUN Write-Output 'Starting PowerShell version check...'; $PSVersionTable.PSVersion; Write-Output 'PowerShell version check completed.' ---> Running in 33c09354f255 container 33c09354f2559185b7672ec891fba7349a423476db82a93083c1d28ddb20ffb4 encountered an error during hcs::System::Start: context deadline exceeded Error: Process completed with exit code 1. Any hint on why it happens the way it is and how to resolve the issue?
lbussell commented 3 months ago

[Triage] Closing as duplicate of https://github.com/microsoft/dotnet-framework-docker/discussions/1153.