sdk-container-builds icon indicating copy to clipboard operation
sdk-container-builds copied to clipboard

Cannot start with windows-host-process mode.

Open wu-yafeng opened this issue 4 months ago • 0 comments

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:

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:

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

wu-yafeng avatar Jul 24 '25 03:07 wu-yafeng