Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

support for windows containers-as-workspaces #6657

Closed as not planned
Closed as not planned
Labels
use-caseA novel and interesting way to use Coder
@ericpaulsen

Description

@ericpaulsen

we've received requests for running windows containers as Coder workspaces. in my attempts to POC this use-case, i've run into issues with howcontainerd executes powershell commands/scripts as part of the entrypointcommand in thekubernetes_pod spec in Terraform. related issue:containerd/containerd#5067

versions

  • host: GCP Windows LTSC with containerd (Windows Server 2019 Datacenter)
  • runtime:containerd://1.6.13-gke.1
  • k8s provider:2.12.1

error

Error: failed to start containerd task "coder-container":hcs::System::CreateProcess coder-container: The system cannot find the file specified.: unknown

tests

1. execute powershell against the init_script terraform object

resource"kubernetes_pod""main" {container {image="docker.io/stefanscherer/node-windows:latest"command=["powershell.exe","-NoExit","-Command",coder_agent.main.init_script]  }}

2. mount the init_script as a volume, execute the file via powershell

resource"kubernetes_pod""main" {spec {container {image="docker.io/stefanscherer/node-windows:latest"command=["powershell.exe","-NoExit","-Command","C:\\coder_init\\init.ps1"]    }volume_mount {mount_path="C:\\coder_init"name="coder-init-script"  }volume {name="coder-init-script"secret {secret_name="coder-init-script"    }  }}resource"kubernetes_secret""init_script" {metadata {name="coder-init-script"namespace="oss"  }type="Opaque"data={"init.ps1"=base64encode(coder_agent.coder.init_script)  }}

3. set theSHELL &ENTRYPOINT in the Dockerfile

FROM stefanscherer/node-windows:latestSHELL ["powershell","-Command","$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]ENTRYPOINT ["powershell.exe"]
resource"kubernetes_pod""main" {container {image="ericpaulsen/windows-test:latest"command=["C:\\coder_init\\init.ps1"]  }}

any feedback, troubleshooting ideas are appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    use-caseA novel and interesting way to use Coder

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp