#Thanks @Courtcircuits for the write-up

1 messages · Page 1 of 1 (latest)

oblique jetty
#

Thank you so much for sharing! By the way, big kudos to @buoyant fern and @limber granite for being such skilled team mates during the hackathon !

boreal oyster
oblique jetty
boreal oyster
oblique jetty
#

And I think that it could be feasable by

  1. mounting the docker socket to the dagger container running qemu
  2. create a volume within a container launched from the dagger container and mount that volume in the dagger container
  3. Finally mount the same docker container to the host

I haven't tested that yet so not sure if it works but it is my best lead so far. I'm really interested on how you would manage that

boreal oyster
#

If you mount the iso in a loop device on the host I think dagger should see that if you run an exec in privileged mode

oblique jetty
boreal oyster
oblique jetty
oblique jetty
boreal oyster
oblique jetty
boreal oyster
oblique jetty
#
Ctr: dag.Container().From("dockurr/windows").
            WithExposedPort(8006).
            WithEnvVariable("VERSION", version).
            WithEnvVariable("RAM_SIZE", ram).
            WithEnvVariable("CPU_CORES", cpu).
            WithEnvVariable("DISK_SIZE", disk).
            WithMountedTemp("/storage").
            WithExec([]string{"/usr/bin/tini", "-s", "/run/entry.sh"}, dagger.ContainerWithExecOpts{InsecureRootCapabilities: true}),
    }

Is the WithMountedTemp method creating a real mount point or doest it also perform a file copy ?

boreal oyster
oblique jetty
oblique jetty
#

I'll test it right away. I'll keep you updated if I manage to run starcraft 😉

boreal oyster
#

It's very likely it'll work

#

A different approach could be to setup a dagger module which runs StarCraft via wine or proton so you don't have to virtualize

oblique jetty
boreal oyster
#

That way the base docker image could be extremely small

boreal oyster
oblique jetty
#

Also our goal was to see how dagger behaves when handling a huge workload like an entire OS

boreal oyster
#

It's just containers in the end

oblique jetty
boreal oyster
#

This way it could be super useful for CI/CD windows workloads

#

GHA has windows VMs but there's no way to run them locally

#

That's something I wanted to do a while back but priorities....

oblique jetty
#

Hmm yep I see what you mean. Honestly I'm far from a windows expert so I don't know how to execute windows workloads but since github does it must be possible.
I had this to my backlog but don't get high hopes on that haha

boreal oyster
#

Or just boot into windows and manually download it via VNC?

oblique jetty
#

So yesterday I tried to use your dagger module but dockurr/windows doesn’t have an option to mount ISO images unfortunately so I’ll need to make my own custom container image inspired by them

boreal oyster
oblique jetty
#

I'm almost there

boreal oyster
oblique jetty
boreal oyster
oblique jetty
#

And also I find bash particularly hard to read and work with 🙈

boreal oyster
#

Were you able to finally install StarCraft?

small snow
oblique jetty
# boreal oyster Were you able to finally install StarCraft?

Not yet I had a lot of work lately and also I needed to mount starcraft with a CDROM, it wouldn't install otherwise. I managed to pass the good arguments to qemu to add a new cdrom but windows doesn't detect it for some reason. I'll be working on it this evening !

#

Here is the compose I use to iterate :

services:
  windows:
    image: dockurr/windows
    container_name: windows
    environment:
      VERSION: "xp"
      ARGUMENTS: "-drive file=/cdrom/STARCRAFT.ISO,media=cdrom -cdrom /cdrom/STARCRAFT.ISO"
    devices:
      - /dev/kvm
      - /dev/net/tun
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    volumes:
      - ./windows:/storage
      - ./cdrom:/cdrom
      - ./en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso:/boot.iso
    stop_grace_period: 2m
oblique jetty
boreal oyster
#

I'll spend sometime tomorrow working on this

oblique jetty
#

We did it !