dotnet / dotnet/sdk-container-builds

Cannot start with windows-host-process mode.

Open
#640 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
197
Forks
53
PR merge metrics
No merged PRs in 30d

Description

`ContainerAppCommand` default value is : `dotnet $(ContainerWorkingDirectory)$(TargetFileName)`. It should be `dotnet ./$(TargetFileName)`.

In windows-host-process mode, it shows /app/mydll.dll is not found.

Consider following yaml:

``` yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: myapp
labels:
myapp
spec:
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\Local service"
hostNetwork: true
containers:
- name: test
image: myaspnetapp:latest
workingDir: /hpc/app
env:
- name: PATH
value: C:/hpc/Program Files/dotnet
nodeSelector:
"kubernetes.io/os": windows

```

temp solution:

``` diff
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: myapp
labels:
myapp
spec:
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\Local service"
hostNetwork: true
containers:
- name: test
image: myaspnetapp:latest

+ command:
+ - dotnet ./myapp.dll
workingDir: /hpc/app
env:
- name: PATH
value: C:/hpc/Program Files/dotnet
nodeSelector:
"kubernetes.io/os": windows

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Search the repository for the ContainerAppCommand default and inspect the code that assembles the container command. Verify the default uses dotnet ./$(TargetFileName), then run the relevant container-build or Windows host-process tests and confirm the application starts without the /app/mydll.dll error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.