{"action":"created","issue":{"url":"https://api.github.com/repos/JetBrains/teamcity-docker-agent/issues/45","repository_url":"https://api.github.com/repos/JetBrains/teamcity-docker-agent","labels_url":"https://api.github.com/repos/JetBrains/teamcity-docker-agent/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/JetBrains/teamcity-docker-agent/issues/45/comments","events_url":"https://api.github.com/repos/JetBrains/teamcity-docker-agent/issues/45/events","html_url":"https://github.com/JetBrains/teamcity-docker-agent/issues/45","id":370181477,"node_id":"MDU6SXNzdWUzNzAxODE0Nzc=","number":45,"title":"Failed to initialize CoreCLR, HRESULT: 0x80004005","user":{"login":"bdaniel7","id":215914,"node_id":"MDQ6VXNlcjIxNTkxNA==","avatar_url":"https://avatars3.githubusercontent.com/u/215914?v=4","gravatar_id":"","url":"https://api.github.com/users/bdaniel7","html_url":"https://github.com/bdaniel7","followers_url":"https://api.github.com/users/bdaniel7/followers","following_url":"https://api.github.com/users/bdaniel7/following{/other_user}","gists_url":"https://api.github.com/users/bdaniel7/gists{/gist_id}","starred_url":"https://api.github.com/users/bdaniel7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdaniel7/subscriptions","organizations_url":"https://api.github.com/users/bdaniel7/orgs","repos_url":"https://api.github.com/users/bdaniel7/repos","events_url":"https://api.github.com/users/bdaniel7/events{/privacy}","received_events_url":"https://api.github.com/users/bdaniel7/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-15T14:08:51Z","updated_at":"2018-10-18T12:21:08Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI'm trying to run a TeamCity agent in a container.\r\nThis is environment:\r\n\r\nThe TeamCity and the agent are the latest from the container (2018.1.3 (build 58658))\r\nThe container is run in Docker for Windows, using Linux containers (because the production will run on Ubuntu).\r\n\r\nroot@teamcity-agent3:/opt/buildagent/work/70bf5e8b1cc61bbe/src# dotnet --info\r\n.NET Core SDK (reflecting any global.json):\r\n Version:   2.1.401\r\n Commit:    91b1c13032\r\n\r\nRuntime Environment:\r\n OS Name:     ubuntu\r\n OS Version:  16.04\r\n OS Platform: Linux\r\n RID:         ubuntu.16.04-x64\r\n Base Path:   /usr/share/dotnet/sdk/2.1.401/\r\n\r\nHost (useful for support):\r\n  Version: 2.1.3\r\n  Commit:  124038c13e\r\n\r\n.NET Core SDKs installed:\r\n  2.1.401 [/usr/share/dotnet/sdk]\r\n\r\n.NET Core runtimes installed:\r\n  Microsoft.AspNetCore.All 2.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]\r\n  Microsoft.AspNetCore.App 2.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]\r\n  Microsoft.NETCore.App 2.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]\r\n\r\nTo install additional .NET Core runtimes or SDKs:\r\n  https://aka.ms/dotnet-download\r\n\r\nWhen I run the build using\r\n\r\n`/opt/buildagent/work/70bf5e8b1cc61bbe/src# /usr/bin/dotnet build trains.sln --framework netcoreapp2.1 --configuration Release --runtime ubuntu-x64`\r\n\r\nin the container, the build is successful.\r\n\r\nHowever when I run the same command as part of a build step, I get this error:\r\n\r\n> Failed to initialize CoreCLR, HRESULT: 0x80004005\r\n\r\nAny ideas on why this error occurs?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/JetBrains/teamcity-docker-agent/issues/comments/430987349","html_url":"https://github.com/JetBrains/teamcity-docker-agent/issues/45#issuecomment-430987349","issue_url":"https://api.github.com/repos/JetBrains/teamcity-docker-agent/issues/45","id":430987349,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDk4NzM0OQ==","user":{"login":"bdaniel7","id":215914,"node_id":"MDQ6VXNlcjIxNTkxNA==","avatar_url":"https://avatars3.githubusercontent.com/u/215914?v=4","gravatar_id":"","url":"https://api.github.com/users/bdaniel7","html_url":"https://github.com/bdaniel7","followers_url":"https://api.github.com/users/bdaniel7/followers","following_url":"https://api.github.com/users/bdaniel7/following{/other_user}","gists_url":"https://api.github.com/users/bdaniel7/gists{/gist_id}","starred_url":"https://api.github.com/users/bdaniel7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdaniel7/subscriptions","organizations_url":"https://api.github.com/users/bdaniel7/orgs","repos_url":"https://api.github.com/users/bdaniel7/repos","events_url":"https://api.github.com/users/bdaniel7/events{/privacy}","received_events_url":"https://api.github.com/users/bdaniel7/received_events","type":"User","site_admin":false},"created_at":"2018-10-18T12:21:08Z","updated_at":"2018-10-18T12:21:08Z","author_association":"NONE","body":"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.\r\n\r\nI 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."}}
{"actor":{"display_login":"bdaniel7"}}