dockur / windows

Windows inside a Docker container.
MIT License
28.74k stars 1.97k forks source link

[Question]: How to use it as Dev Container image? #864

Open Diegorro98 opened 5 days ago

Diegorro98 commented 5 days ago

Is your question not already answered in the FAQ?

Is this a general question and not a technical issue?

Question

I would like to use the image in a devcontainer, vscode tries it. This what I already done: create a workspace with a file called .devcontainer/devcontainer.json with the following content:

{
  "name": "Windows Dev Container",
  "image": "dockurr/windows",
  "postCreateCommand": "/usr/bin/tini -s /run/entry.sh",
  "runArgs": [
    "--device=/dev/kvm",
    "--cap-add",
    "NET_ADMIN",
    "--stop-timeout",
    "120"
  ],
  "appPort": [
    "8006:8006",
    "3389:3389/tcp",
    "3389:3389/udp"
  ]
}

Then open the workspace with vscode and execute remote-containers.reopenInContainer command In local it was working, but because I didn't have enough space, I think it failed.

I also tried at codespaces, limiting the disk space to 16G with "containerEnv":{"DISK_SIZE":"16G"}, and it booted, but trying to access to the desktop from the browser doesn't seem to be working (connection refused)

maksymdor commented 5 days ago

Great!