Running Windows in a Docker Container!
ฝัง
- เผยแพร่เมื่อ 12 มิ.ย. 2024
- Huge thanks to Ridge for sponsoring the video! Use this link to get up to 30% off through April 1st: ridge.com/wolfgang
dockur/windows by Kroese: github.com/dockur/windows
Follow me:
Mastodon tilde.zone/@notthebee
GitHub github.com/notthebee
Twitch twitch.com/notthebeee
Support the channel:
Patreon / wolfgangschannel
TH-cam Members / @wolfgangschannel
Ko-fi (one time donation) ko-fi.com/wolfgangschannel
Videos are edited with Davinci Resolve Studio. I use Affinity Photo for thumbnails and Ableton Live for audio editing.
Video gear:
Camera geni.us/IdnhpP (Amazon)
Main lens geni.us/MF3Ej (Amazon)
Secondary camera geni.us/aQ3l (Amazon)
Secondary lens geni.us/jh0Oy7Y (Amazon)
Microphone geni.us/tgiSqL (Amazon)
Key light geni.us/Gi1zE2 (Amazon)
Softbox geni.us/F86pM (Amazon)
Secondary light geni.us/aciv (Amazon)
Other stuff that I use:
Monitor geni.us/KUzcmcP (Amazon)
Monitor arm geni.us/Ei4x (Amazon)
Laptop stand geni.us/hG7Y39 (Amazon)
Keyboard geni.us/KSR6En (Amazon)
Mouse geni.us/JpQG (Amazon)
Audio interface geni.us/sdhWsC (Amazon)
As an Amazon Associate, I earn from qualifying purchases
CHAPTERS
00:00 Introduction
01:27 Ridge
02:16 Running a Windows 11 Container
02:59 How does it work?
04:17 Configuring RDP and other options
06:35 Running other versions of Windows
08:15 Legality
09:19 Outro - วิทยาศาสตร์และเทคโนโลยี
Huge thanks to Ridge for sponsoring the video! Use this link to get up to 30% off through April 1st: ridge.com/wolfgang
dockur/windows by Kroese: github.com/dockur/windows
CORRECTION: This will not work on Mac, only on Linux.
It is not running in a docker container. Interesting but the title is really misleading.
“Running Windows in a VM that is run by a Docker container that mounts /dev/kvm from the host, but also automates the installation for you” doesn’t really roll off the tongue
Next step: windows distrobox guest?
Can also create a template / kvm image using packer, and just run it with kvm. Or if using kubernetes, use kubvirt to run them.
Hey Wolfgang - We sent you an email about a paid partnership. Let me know what you think.
Using WSL under Windows 11 to run Docker, which is also running a container for Linux that is running a virtualisation of Windows 11 is so ridiculously cursed and I LOVE it.
Someone stop him!
@@Demios101 no I use windows WSL too its amazing
And I thought using Wine via WSL was cursed enough, that's a whole other level 😱
yeah try runnin mac os under gwsl
It's tempting to try but I know my computer will hate me for that torture.
It's not running in a Docker Container. It's running in a KVM backed QEMU VM that is automatically configured by a Docker script. Saves some problems with config at least.
it is? lmao containers are just normal processes with some security flags
QEMU is a type-2 userland hypervisor AND a kvm virtualizer. If you set kvm: false in the environment it will run entirely in userland inside docker
It is a KVM in the guise of a docker "container".... An interesting project no doubt.
Might actually be useful aswell
then why not use vagrant
7:34 The entirety of RAM and swap being completely pegged by the VMS's
Missed Opportunity: Naming it "Linux Subsystem for Windows"
I love that you used the same port as Proxmox, and used Proxmox as your complicated example of running a VM.
I'm surprised he somehow used KVM with a Mac, or was he remoting into the cluster with that clunky macOs ? or is it a hackintosh also running under KVM ?
@@monad_tcp Medium article "Qemu, virt-manager, and libvirt on macOS with Apple silicon M2".
What an absolutely impeccable timing... I was _just_ about to set up a VM so I could update my damn mouse (love you logitrash
Why on Earth would one need to UPDATE the mouse? Security vulnerabilities? 🤣
@mikhail-plentev You're laughing, but... www.bleepingcomputer.com/news/security/logitech-unifying-receivers-vulnerable-to-key-injection-attacks/
@@mikhail-pletnev Bug with scrolling, sometimes doesn't register when in wireless mode, super annoying
@@AQDuck, but you still need USB passthrough for it, don't you?
@@LichtTempler As he said in the video, it uses KVM so you can pass any device through
As an Unraid user I just (un)surprisingly found this image in the Apps. I'm giving it a try and thank you for sharing!
I don't know how you deliver such awesome quality almost every time!!!
I totally loved it!
Docker tends to ignore UFW and writes to iptables, so be careful with that open 3389.
what is the worse scenario
@churchofsatan2041 you run this on an unfirewalled machine with a public IP, and then anyone can log in to your Windows container using RDP
@@WolfgangsChannel My original comment was to say that even if your host machine is firewalled you should double check that you're not exposing 3389 to networks you don't want it to be available on. I ran into that issue with an FTP container on a production machine once. Thankfully blue team found it.
You can just do 127.0.0.1:port:port instead of port:port
this will only bind to 127.0.0.1 instead of 0.0.0.0
Docker will ignore any and every firewall rules because that is its purpose. It directly opens ports using iptables.
You can use host networking if you want a container to follow your firewall rules.
nftables, not iptables. iptables is deprecated and will be removed in the future.
Wolfgang, superb video. How clever of you to know this is exactly what I was looking for.
Has a lot of potential in CI/CD for testing code
I reviewed the project and I couldn't found any option for running any command in the container without using GUI. So only wine containers are still the option.
A truly interesting and definitely useful video - well presented. I'm going to give this a try. Thanks!
Cannot wait for the N100 build video! I’m about to build my home server/nas and I’m about to go with the industrial ASRock board. But I’m holding my horses and waiting patiently for your N100 build. Love your content, keep up the good work! ❤
Good news - it's coming at the end of the month :)
Woah! This couldn't have come at a better time! I was just looking for a solution to run a DayZ server, a Windows only application, without needing to leave one of our gaming PCs on all the time.
Now I just need more RAM before I can setup a VM on my Ubuntu server.
oho day Z player here. I love that game
Not sure if you read comments, but great video! You mentioned in your PiKVM video that you can use alternative hardware to run PiKVM other than the raspberry pi, as the Pi isn't really worth it in terms of cost. I'd be really interested in an update on that topic, I believe you specifically mentioned using a cheap TV box instead of a Pi.
I can't believe I haven't came across this sooner, this is awesome.
I was just trying to solve this problem and was gonna end up using Cockpit to manage a dedicated Windows VM. I hadn’t even considered putting a VM inside of a Docker container. That’s so simple but so clever.
Love your sense of humor. Super subtle.
Thank you for the discovery of this project.
What a juicy content, thank you sir I was in need of it
fantastic. love it..
thanks wolfgang!
Did you have to install anything for your macOS to have the file /dev/kvm? Mine doesn't have, even after installing qemu, libvirt and some other software
Yeah I'm wondering how to get this to work under MacOS Monterey as well.
this just saved me hours of work, thanks
just tried it, amazing! thanks!!
A great explanation, I followed along and did the Win 11 install on Ubuntu 24.04 LTS and it was seamless. Thanks!!
Thanks for sharing. This is really rather cool to hear about.
I wonder what the viability of running blueiris with gpu decoding is.
I'm already using harvester to run my vm's and containers. It technically runs vm's as pods ontop of kubernetes so this may not be for me, but I have an idea which I can use this project for, deploying cms windows displays. Since the player will be always be in fullscreen, I can simply use any broswer, connect with ip address and have the content displayed on the tv or media screen device. Thanks very much for the video.
Excellent video, Wolfgang. Thank you! Is this possible on docker desktop?
Windows: not even once
All power users use all the possible platforms.
Now I can run heroes III again
Does it run in TrueNAS in k3s ? or in LXC on proxmox? Yes I am Terrible.
I have myThinkPad running Arch for a while now. this is useful to have a Windows option on standby.
Also my one remaining windows box will go native Linux now
Hello. Thank you for the video, it is really instructive. This is the first video from you I watch, so excuse me if you have already answered my questions in previous videos.
I am *really* new into docker, in fact, I am barely documenting on the subject because I recently had the 'idea' of running Office 365 in Docker (knowing nothing about it before hand) instead of my MacOS Parallels Desktop VM which I do since 2010 when I switched from Windows.
1. What would be the advantages of the change, and would be the trade-offs?
2. Since I know *nothing* about Docker except for a couple of videos I have watched about it, would you recommend me to change my VM to Docker? (Knowing I need to use Office 365 for developing macros, Excel, Power Query and other heavy Office add-ins in my day-to-day work)
3. Do you have or do you have links to videos where I can learn Docker from scratch?
Thanks!
This video contains at least two crucial errors:
1) in the compose.yaml file, The CPU_CORES value must also be inside double quotes:
2) "docker compose up -d" won't do anything. "docker-compose" is a separate command that may have to be explicitly installed in your system. After doing that, the correct comand is "docker-compose up -d"
docker-compose refers to deprecated compose v1. docker compose is the „correct“ way to do it since v2: docs.docker.com/compose/migrate/#how-do-i-switch-to-compose-v2
I need it to code in C# for windows from my MacBook m1 pro. I was evaluating parallels 19... Do you think I can use this one instead? 🤔 I wonder the difference in CPU/RAM % ... Maybe you can make a comparison
Nope, you need a Linux host for it
One of my 2024 goals is to begin using Docker for some of my tasks as a software engineer doing medical imaging research. Although this is not exactly what I need I plan to give it a test..
Hello...Used in Ubuntu...when you finish using Windows 11 (by default)...what is the path to eliminate the Used and Unnecessary Space by Windows 11 in the Download of the .iso and in the Decompression of the .iso ...Thank you 😊
Pretty cool! Wouldn’t you lose the best perk of Docker Containers tho? Talking about the fact that they use the same kernel as the host. This seems to me like it only adds an additional, superfluous layer of abstraction
I can already play minesweeper on Linux with KMines or winemine, and play pinball with the open source SDL version (which I believe is reverse-engineered from winxp). I'm using my Windows VM for compiling C++ code for Windows with MSVC, and occasionally for some light 3D gaming. This would work for the compilation part, even better than a persistent VM.
This video will hit millions of views!
Finally someone show something Very important
Thank you. This is brilliant.
I do have a question. How did you download that youtube video using ed/ ? I can't figure that out.
Also, how do you run the multiple version of Windoze at the same time? How does your compose.yaml file looks like for that?
I tried creating another with different ports for the noVNC, but I could never connect to it. I see you have all the shared data* folders in the same folder. If you could share this step that would be great.
Enjoying your videos :)
work for gaming? i have a t14 gen 2 i5 1135g7, i reed on some forum that this cpu doesn't have GVT-d this use SR-IOV that you can use only with ACRN hypervisor (single iGPU passthrough)
arch linux 8gb ram
Super slick!!!!!!
Im not a programmer so its been challenging to find a use case for me to try Docker. This maybe my Gateway drug!
Just keep in mind that this isn't a real container. Windows is being virtualized by the KVM kernel driver which means it's a VM and not a container. This video is a bit misleading
0:34 You don't need an MS account. Just choose other and choose a domain, then it lets you sign in locally.
Thanks for the video. Is it possible to change the hypervisor from KVM to VMware?
Last night I started looking for alternatives to run Windows on my mac, vid couldn't have had a better timing
You could always run a desktop version of VMware (VMware Workstation) and run Windows there, but I guess you want to run open-source software?
@@Equality-and-LibertyI've been a bit out of the vm scene and was going to virtualbox it, this served it's purpose and there's no clean up to do after other than image and container in docker, pretty sweet
It would be interesting to know how responsive the Windows "docker container" is without a passthrough GPU, since video acceleration would not be available and everything will be rendered via software. Currently, I have a Windows VM with GPU passthrough for my ONE use: running MS Office for work. If the docker container can run with the same responsiveness as an older machine (say, i7-6700 with its iGPU) without the need for a dedicated GPU to be passed through, that would be really great for my use case.
If you don’t need the OneDrive integration, which doesn’t work well, the Linux version of CrossOver runs Microsoft Office pretty well.
@@paradoxmoCrossover is too expensive in most countries
@@applmango sure, Wine or PlayonLinux then. Or VMware player has decent paravirtualized 3D.
Windows product keys used are in the /assets XML files, so if one has licenses, I assume they can pre-configured to "valid" ones. :)
Cool idea and workaround!
I have Windows 11 Pro installed and running in Ubuntu as a Docker container but I can't get the sound working. Did I miss something in the video somewhere about getting sound to work in the Windows VM?
Internally we're going to start with setting up the container as a way to test intune and autopilot configurations, before we deploy them in production. Makes testing much easier !
does this solution avoid the problem of nested virtualization on Apple silicon chips?
context: the apps I require to test on windows need wsl2+docker (on windows). at the moment (at my knowledge) is not possible to achieve this environment on any Apple silicon chip (like M1, M2 or M3) forcing me to use a separate machine with x86_64 cpu
It would not avoid it, you won’t be able to run WSL2 inside this.
If you’re using VMs anyway, just use WSL1 and use the VM network to connect to a docker daemon on a Linux VM.
Was watching this video in sleepy mode this morning. Great stuff! Even put some smiles on my face and made me laugh! Well done! :) Ive seen all the macOS buttons and was ready to undust my MacBook...but reading your CORRECTION now in the comments. NOT on Mac. Too bad. ^^ Anyway, appreciated!
Is there the possibility of doing a pass through and using the video card for this docker and performing heavier tasks such as video editing or games?
This would be incredibly awesome for testing and/or JPackage. I think I know what i'm doing this weekend :)
can u share your yml settings? does this remember your setting and install applications? can i backup to use on another machine. like i can with kvm
Thank you, this is awesome ! I was wondering, on Proxmox, is there a port or an equivalent of this project, but in an LXC container ?
My guy has all the major OSes in 1 video
This was pretty good. However, I could not find an environment setting that would have the container built from a local windows iso file. Is downloading every time the only way for now?
Hi,
what about licenses if this is being installed in production scenarios for example?
Tnx
Awesome thank you!
This is awesome! Vt-d is not relevant though. Will have to modify it to try 11arm on apple silicon
There's also quickemu, which IMO seems better at this for a workstation PC.
This project however may make more sense if you want the VM to be reachable from outside (and just have a simple setup, no need for something like proxmox), since it comes with a webclient etc.
Currently using Windows to develop and test my software, but I found a second PC using RDP to be the best for this use case.
I have the same motherboard, is there a reason you needed that BIOS utility?
@9:15 If MS had a problem, would they have already stopped WoR? (Windows on Raspberry)
How to save the iml file once opened and pasted the commands ?
I don't know how to save the file.
are there any specific keyboards shortcuts?
Any idea if you can run Visual Studio and WinForms inside this? I imagine there might be a lot of lag, but would be fun to try it
Lag is when your mom blow my job
My heart dropped a beat at the title of the video
Hey bro I just watched your video on NAS vs Home servers. When you say you stream media, its only local right? How would you stream it remotely or on your phone?
VPN into my home network
Can i run windows server core with windows admin center and active directory inside it?
I needed 1 year ago Windows for a game. But I didn‘t want to dualboot. So I setup a VM with libvirt and then did a single-gpu-passthrough. I needed a bit to get it working, because I had a Problem, that was really rare, there was only one open thread that you could find and that was on a Proxmox forum. Without the help of a other person, that found that, I might never get it to work. But with the time I didn‘t used the VM anymore and because I really often switch my Linux Distro, I started to not set it up again and nowadays I don’t have a use case for any VM‘s
Thats gold right there!
Great video!
So its like Vagrant but inside a Docker container?
Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory
I saw in your start menu you have Lumiar Neo. Have you tested that in this setup? I used to try to get some photo editing tools to run in a kvm vm, but there was always the problem of not having installed opencl or some other hardware acceleration frameworks. Could say something more about that?
I've no idea what Luminar Neo is, sorry
@@WolfgangsChannelit's in the start menu at 5:53 but I guess that this is a windows ad then hahaha
Finally! I can use my laptop (which has arch installed btw) for autocad because of a stupid class at uni.
How could it apply a firmware update for your system in a VM?
Hi, I have proxmox on a server with the virtaulize option enabled, but when I create a VM does not allow me to create the container because there is no /dev/kvm, I have to create the machine with some option ?
Wow. thats impressive.
Please help, can I run games like Counter Strike with this setup on my macbook?
Why do you want to edit the Z690M-ITX bios? Is there any secret power saving tricks perhaps?
I did everything shown here. But unable to connect with microsoft remote desktop. Can you help ?
Does anyone know why the container stops after a few minutes of being started?
I couldn't find a way to activate audio. Gemini and Copilot have some suggestions about using Pulseaudio in Windows, which I did to no avail. Has anyone managed to activate audio?
How do you edit BIOS when it's still vm with own BIOS?
It outputs a bios file, which you can load to a flash drive, boot to your bios, and load the configuration file there. It's not docker updating the bios directly. At least that's what I think is happening
"I guess MS doesn't want us to needlessly suffer" :)
I am running Docker on a Ubuntu VM. Does that mean that if I want to run this Windows container I have to increase the size of the virtual disk of my Ubuntu VM? I don't have 64 GB of space left on my virtual disk.
What I would like to do is just run my already installed windows 11(system is dual boot) through Linux so I dont have to restart for apps that STILL wont run on Linux.
@Wolfgang's Channel : (a bit off topic here) Would it be an idea to test a range of UPS devices for functionality and power consumption? Every home lab needs a UPS of some sort, and idle power consumption varies a lot between models.. Would be nice to see a shoot out?
doubt, could this windows be integrated into "active directory"? Or would the host also have to have such integration?
Wow seems very useful to me since I yearly need an old Windows program to handle my taxes. It's a hassle every year but this docker might be the solution for running windows 15 minutes yearly.
So, does Windows 7 configured with dockur runs better than Windows 7 in Virtualbox ?
If it's KVM, couldn't you just use Virtual Manager?
great video bro!
Is it possible to install this "Windows" in a Synology NAS Docker (Container Manager)? I found it dockurr/windows in the registration tab in my Synology, but it is not possible to run it. Can you give me some tips?
I don't see why it can't be run on a Synology. It is just a container like all the other containers. The only problem you can have is that it consumes a lot of resources, and that is the reason why I am not going to run it on Synology.
Seems interesting, curious about malware problems though