-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkvmdocker.sh
More file actions
46 lines (34 loc) · 1 KB
/
kvmdocker.sh
File metadata and controls
46 lines (34 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
while true; do ping -c1 www.google.com > /dev/null && break; done
sudo apt update && sudo apt upgrade -y
sudo apt install curl -y
sudo apt install docker.io docker-compose -y
sudo systemctl enable docker
sudo systemctl start docker
sudo echo 'user ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers
sudo apt install -y -- libvirt-daemon-system
sudo apt install git -y
cd
git clone https://github.com/ms-jpq/windows-in-docker
sudo tee ~/windows-in-docker/docker-compose.yml <<EOF
---
version: "3.9"
services:
libvirt:
restart: always
image: msjpq/windows-in-docker:latest
security_opt:
- apparmor=unconfined
environment:
TZ:
# Make sure DATA_DIR is the same across the three `${DATA_DIR}`s
# The windows drivers are also downloaded under here.
DATA_DIR: "/kvmdata""
ports:
- 80:8080
volumes:
- /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock:ro
- "/root/glusterfs/kvm:/kvmdata"
EOF
cd ~/windows-in-docker/
docker-compose up -d