.Net runner custom command fails in docker

Answered

I have a build step that uses the .Net runner to remove a project from the solution using the custom command "sln remove ..\docker-compose.dcproj" inside the mcr.microsoft.com/dotnet/sdk:6.0 Docker container.

Since upgrading TeamCity to 2022.10 (build 116751), it now fails with the following error

 
Step 1/4: remove docker compose from solution (.NET) 13s
12:03:12 
  Running step within Docker container mcr.microsoft.com/dotnet/sdk:6.0.302
12:03:12 
  Starting: /usr/bin/snap sln remove ..\docker-compose.dcproj
12:03:12 
  Starting: sln remove ..\docker-compose.dcproj
12:03:12 
  in directory: /opt/teamcity/work/807a8c34bd6096b9/Core
12:03:13 
  6.0.302: Pulling from dotnet/sdk
12:03:13 
  Digest: sha256:2d4a7a352d5a9b9acd3b4bacb1d621a2eeeaf7ea8ea54a081736604d683f359a
12:03:13 
  Status: Image is up to date for mcr.microsoft.com/dotnet/sdk:6.0.302
12:03:13 
  mcr.microsoft.com/dotnet/sdk:6.0.302
12:03:13 
  /opt/teamcity/temp/agentTmp/docker-shell-script-8330158552950120140.sh: 4: /usr/bin/snap: not found
12:03:13 
  Process exited with code 127
3 comments
Comment actions Permalink
Hi, I've checked it with the default executable path, `dotnet`, and `/usr/bin/dotnet` on a Windows Docker host and Linux container. It looks like version 2022.10 works incorrectly with it. Running the same build configuration on a Linux Docker host worked for me. Please upvote/follow this bug for further updates: https://youtrack.jetbrains.com/issue/TW-78645.

Regarding the `/usr/bin/snap: not found`, I believe it comes from the Executables filed in the build step settings. It should either be left empty or set to tge `dotnet` executable path.

Cheers!
-Anatoly
0
Comment actions Permalink

A quick update, as you can probably see from this comment in YouTrack, there is a patched .NET plugin version. Please install it as an external plugin to resolve the issue.

0
Comment actions Permalink

Hi, Installing the patched .NET plugin fixed it for me.

1

Please sign in to leave a comment.