Skip to content

Cannot start with windows-host-process mode. #640

@wu-yafeng

Description

@wu-yafeng

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions