Skip to content

Commit

Permalink
Set XDG_DATA_HOME when executing dotnet command
Browse files Browse the repository at this point in the history
Since the upgrade to Dotnet 6.0.10, there was a permission denied error (dotnet/core#7868). The version of dotnet is now also pinned in the Dockerfile.
  • Loading branch information
Kobzol committed Oct 15, 2022
1 parent cdec7c4 commit 540a3c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evaluator/images/dotnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM kelvin/base

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
dotnet6 \
aspnetcore-runtime-6.0 \
dotnet6=6.0.110-0ubuntu1~22.04.1 \
aspnetcore-runtime-6.0=6.0.110-0ubuntu1~22.04.1 \
python3-pip && \
rm -rf /var/lib/apt/lists/*

Expand Down
2 changes: 2 additions & 0 deletions evaluator/images/dotnet/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def build_dotnet_project(run_tests: bool) -> BuildResult:
tests_path = "tests.xml"
env = os.environ.copy()
env["DOTNET_CLI_HOME"] = "/tmp/dotnet-cli-home"
# workaround for https://github.com/dotnet/core/issues/7868
env["XDG_DATA_HOME"] = "/tmp/dotnet-cli-home"
env["DOTNET_NOLOGO"] = "1"
cmd = ['dotnet']
if run_tests:
Expand Down

0 comments on commit 540a3c1

Please sign in to comment.