daytona icon indicating copy to clipboard operation
daytona copied to clipboard

Windows Daytona workspace

Open Tpuljak opened this issue 1 year ago • 44 comments

Describe the solution you'd like We should explore the possibility of running Windows images with Daytona to allow users to create workspaces in a Windows environment. This feature might enable additional native development workflows that can not be ran on Linux. We should look into https://github.com/dockur/windows as possible images to use.

Additional context We should first discuss the approach here and outline the necessary changes, if any, needed to make this happen.

Tpuljak avatar Nov 14 '24 13:11 Tpuljak

New Quest! image New Quest!

A new Quest has been launched in @daytonaio’s repo. Merge a PR that solves this issue to loot the Quest and earn your reward.


Loot of 500 USD has been stashed in this issue to reward the solver!

🗡 Comment @quest-bot embark to check-in for this Quest and start solving the issue. Other solvers will be notified!

⚔️ When you submit a PR, comment @quest-bot loot #1339 to link your PR to this Quest.

Questions? Check out the docs.


👉 If no one is assigned to the issue, you are welcome to embark on the quest and tackle it without confirmation from us. In the event that multiple PRs are made from different people, we will generally accept those with the cleanest code.

quest-bot[bot] avatar Nov 14 '24 13:11 quest-bot[bot]

@Tpuljak I want to know that how the image that we are currently using Is configured. Is there a seperate repository or docker hub link ?

divanshu-go avatar Nov 14 '24 14:11 divanshu-go

@divanshu-go the current default image that daytona ships with (daytonaio/workspace-project) is built with the devcontainer definition found here https://github.com/daytonaio/daytona/tree/main/hack/project_image.

Tpuljak avatar Nov 14 '24 14:11 Tpuljak

what the use of [builder_image/.devcontainer](https://github.com/daytonaio/daytona/tree/main/hack/ then

divanshu-go avatar Nov 14 '24 14:11 divanshu-go

@divanshu-go the current default image that daytona ships with (daytonaio/workspace-project) is built with the devcontainer definition found here https://github.com/daytonaio/daytona/tree/main/hack/project_image.

@Tpuljak thanks for the information , are there any other hacks or workarounds to configure while testing it ?

divanshu-go avatar Nov 14 '24 14:11 divanshu-go

what the use of [builder_image/.devcontainer](https://github.com/daytonaio/daytona/tree/main/hack/ then

You can ignore that for now.

are there any other hacks or workarounds to configure while testing it ?

No need for hacks. You can configure the default by running daytona server configure or do it on a per-workspace basis with --custom-image and --custom-image-user (or in the advanced config view) when running daytona create.

Tpuljak avatar Nov 14 '24 14:11 Tpuljak

@Tpuljak what if we consider using https://mcr.microsoft.com/en-us/catalog?search=window&type=partial rather than https://github.com/dockur/windows

divanshu-go avatar Nov 14 '24 14:11 divanshu-go

@divanshu-go you're free to suggest any approach that will accomplish the goal of creating a windows-based workspace.

Tpuljak avatar Nov 14 '24 14:11 Tpuljak

@Tpuljak

we have two options here

1. using one of the official images https://hub.docker.com/r/microsoft/windows

Cons:

  • these containers can only be built on windows-kernel ( windows home edition) not supported.

  • they only works on https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/system-requirements#operating-system-requirements

  • limitations https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/lift-shift-to-containers#what-cant-be-moved-to-windows-containers

Pros:

  • they are much faster than https://github.com/dockur/windows because these are using the underlying windows hardware while https://github.com/dockur/windows use kvm-qemu virtualization which is slower
  • use less resources
  • more efficient

2. using https://github.com/dockur/windows

Cons:

  • currently KVM QEMU virtualization only work on Window11 (docker engine) and Linux(docker engine), using Docker desktop is currently compatible https://github.com/dockur/windows?tab=readme-ov-file#compatibility-%EF%B8%8F

  • It just makes a VirtualBox of Windows in a container using standalone scripts which utilises KVM-qemu underneath

  • use a lot of resources

  • will be very hard to use as windows-based workspace.

Pros:

  • allow full control to users

divanshu-go avatar Nov 15 '24 07:11 divanshu-go

@quest-bot embark

vishwamartur avatar Nov 15 '24 07:11 vishwamartur

@vishwamartur has embarked on their Quest. 🗡

  • @vishwamartur has been on GitHub since 2020.
  • They have merged 0 public PRs in that time.
  • Their swords are blessed with HTML and CSS magic ✨
  • They haven't contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

quest-bot[bot] avatar Nov 15 '24 07:11 quest-bot[bot]

@quest-bot embark

divanshu-go avatar Nov 15 '24 07:11 divanshu-go

@divanshu-go has embarked on their Quest. 🗡

  • @divanshu-go has been on GitHub since 2024.
  • They have merged 12 public PRs in that time.
  • Their swords are blessed with CSS and JavaScript magic ✨
  • They have contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

quest-bot[bot] avatar Nov 15 '24 07:11 quest-bot[bot]

  1. using one of the official images https://hub.docker.com/r/microsoft/windows

@divanshu-go, I don't believe that this is a viable options. From what I can see, windows containers aren't meant for this use case but rather only for deployment on Windows Servers.

  1. using https://github.com/dockur/windows

Even though the support is currently lacking for MacOS, I suggest you try this out. You can create an example repository with a devcontainer configuration that has this (https://github.com/dockur/windows?tab=readme-ov-file#usage-) docker compose set. Then try to run daytona create THAT_REPO and let us know how it goes. Looking at the compose, Daytona might not even have to do anything special here if it can be fully configured with the devcontainer standard.

Tpuljak avatar Nov 15 '24 08:11 Tpuljak

@Tpuljak If we go with option 1 of using microsoft images and if we want to test them out on linux or macs , we use setups mentioned here accordingly , https://github.com/StefanScherer/windows-docker-machine?tab=readme-ov-file

using this will enable support on all three OS - linux , mac , windows (might work on home edition if we use WSL)

divanshu-go avatar Nov 15 '24 08:11 divanshu-go

@Tpuljak If we go with option 1 of using microsoft images and if we want to test them out on linux or macs , we use setups mentioned here accordingly , https://github.com/StefanScherer/windows-docker-machine?tab=readme-ov-file

using this will enable support on all three OS - linux , mac , windows (might work on home edition if we use WSL)

@divanshu-go okay. Please try out both setups yourself and let use know how it goes and what might be the better option in the context of Daytona.

Tpuljak avatar Nov 15 '24 08:11 Tpuljak

@Tpuljak image which image should we use. progress till now , https://github.com/divanshu-go/windows-dev-container.git

divanshu-go avatar Nov 15 '24 13:11 divanshu-go

which image should we use.

@divanshu-go use anything you want. Ideally, all of them will work normally.

Tpuljak avatar Nov 15 '24 13:11 Tpuljak

I meant to say that should we show a option to the user regarding this or whatever we choose ?

divanshu-go avatar Nov 15 '24 13:11 divanshu-go

I meant to say that should we show a option to the user regarding this or whatever we choose ?

If this can be solved through a devcontainer, there is no need to implement anything in Daytona.

Tpuljak avatar Nov 15 '24 13:11 Tpuljak

image

PS: it worked in the vscode devcontainers

divanshu-go avatar Nov 15 '24 13:11 divanshu-go

image

divanshu-go avatar Nov 15 '24 13:11 divanshu-go

@quest-bot embark

naaa760 avatar Nov 15 '24 19:11 naaa760

@naaa760 has embarked on their Quest. 🗡

  • @naaa760 has been on GitHub since 2024.
  • They have merged 3 public PRs in that time.
  • Their swords are blessed with JavaScript and TypeScript magic ✨
  • They haven't contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

quest-bot[bot] avatar Nov 15 '24 19:11 quest-bot[bot]

@quest-bot embark

Vivekgaddigi avatar Nov 16 '24 05:11 Vivekgaddigi

@Vivekgaddigi has embarked on their Quest. 🗡

  • @Vivekgaddigi has been on GitHub since 2022.
  • They have merged 0 public PRs in that time.
  • Their swords are blessed with Shell and Makefile magic ✨
  • They haven't contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

quest-bot[bot] avatar Nov 16 '24 05:11 quest-bot[bot]

image

divanshu-go avatar Nov 16 '24 08:11 divanshu-go

@divanshu-go based on the discussion we had in slack, you managed to get a windows-based container running and the next step is to figure out how to get agent ssh server running on windows so we can have it running and connected to the daytona server.

Tpuljak avatar Nov 19 '24 08:11 Tpuljak

image

divanshu-go avatar Nov 19 '24 14:11 divanshu-go

@divanshu-go no need for this. If you send me a message on Slack, expect a response there.

If you want to discuss the approach here, which we prefer, you will get a response here.

Tpuljak avatar Nov 19 '24 15:11 Tpuljak