A container runner for .NET applications on Open Source Cloud (OSC). It clones your repository, builds the .NET project, and runs it on port 8080, showing a loading page while the build is in progress.
- .NET 8.0 LTS (default)
| Variable | Required | Description |
|---|---|---|
SOURCE_URL |
Yes | HTTPS URL to the Git repository (alias: GITHUB_URL). Append #branch to check out a specific branch. |
GIT_TOKEN |
No | Personal access token for private repositories (alias: GITHUB_TOKEN). |
PORT |
No | Port to listen on (default: 8080). |
SUB_PATH |
No | Sub-directory within the repository to build. |
OSC_BUILD_CMD |
No | Override the default build command. Replaces the auto-detected dotnet publish invocation. |
OSC_ENTRY |
No | Override the entry DLL filename inside /app/published/. For example, MyApp.dll. Without this, the runner auto-detects the first .dll in the publish output. |
CONFIG_SVC |
No | Name of an OSC app-config-svc instance to load environment variables from. |
OSC_ACCESS_TOKEN |
No | OSC personal access token. Required when CONFIG_SVC is set. |
docker run --rm \
-e SOURCE_URL=https://github.com/your-org/your-dotnet-app \
-e GIT_TOKEN=ghp_... \
-p 8080:8080 \
ghcr.io/eyevinn/dotnet-runner:latestTo use a specific branch:
docker run --rm \
-e SOURCE_URL=https://github.com/your-org/your-dotnet-app#main \
-e GIT_TOKEN=ghp_... \
-p 8080:8080 \
ghcr.io/eyevinn/dotnet-runner:latestThe entrypoint auto-detects the project to build in this order:
- A
*.slnsolution file (up to 2 directory levels deep) - A
*.csprojproject file (up to 3 directory levels deep) - Falls back to
dotnet publish .in the repository root
The compiled output is placed in /app/published/. The runner then looks for the first .dll file in that directory as the entry point, excluding .deps.dll files.
You can deploy any public or private .NET application directly from OSC My Apps. Set:
- Source URL: the HTTPS clone URL of your repository (optionally with
#branch) - GitHub Token: your personal access token for private repositories
The runner will build and serve your application automatically.
While the application is building, a loading page is served on port 8080. If the build fails, an error page is served and /healthz returns HTTP 500 with {"status":"build-failed"}. During a successful build, /healthz returns HTTP 503 with body Building.
MIT License. Copyright (c) 2024 Eyevinn Technology AB.