Open bdaniel7 opened 5 years ago
I think this occurs because the teamcity agent runs under buildagent user and the folders and files created during agent instalation (/opt, /tmp) are rw only for root:root.
I tried to add root to group docker and set chown those directories to root:docker but to no avail. New folders generated when the any "dotnet" command starts are owned and rw by root.
I have the same issue. Any ideas?
One workaround is to set the environment variable COMPlus_EnableDiagnostics=0 in all the containers where dotnet runs. The variable is used to determine whether the clr will write some debug information in /tmp. You can search for more details about that variable in the .NET Core GitHub issues log.
@bdaniel7 Thank you. It`s helped
@bdaniel7 could you share commands which are used to run TeamCity server and agent in docker?
They are run using docker-compose: teamcity-server: restart: always image: jetbrains/teamcity-server:latest container_name: teamcity hostname: 'teamcity' depends_on:
trains-backend
teamcity-agent1: restart: always image: bdaniel7/teamcity-docker-agent-with-node:latest container_name: teamcity-agent1 hostname: 'teamcity-agent1' environment:
@bdaniel7 by default TeamCity agent uses this TEMP directory TMPDIR=/opt/buildagent/temp/buildTmp
. Try using the same.
Hi,
I'm trying to run a TeamCity agent in a container. This is environment:
The TeamCity and the agent are the latest from the container (2018.1.3 (build 58658)) The container is run in Docker for Windows, using Linux containers (because the production will run on Ubuntu).
root@teamcity-agent3:/opt/buildagent/work/70bf5e8b1cc61bbe/src# dotnet --info .NET Core SDK (reflecting any global.json): Version: 2.1.401 Commit: 91b1c13032
Runtime Environment: OS Name: ubuntu OS Version: 16.04 OS Platform: Linux RID: ubuntu.16.04-x64 Base Path: /usr/share/dotnet/sdk/2.1.401/
Host (useful for support): Version: 2.1.3 Commit: 124038c13e
.NET Core SDKs installed: 2.1.401 [/usr/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
When I run the build using
/opt/buildagent/work/70bf5e8b1cc61bbe/src# /usr/bin/dotnet build trains.sln --framework netcoreapp2.1 --configuration Release --runtime ubuntu-x64
in the container, the build is successful.
However when I run the same command as part of a build step, I get this error:
Any ideas on why this error occurs?