This commit is contained in:
Zengtudor 2025-01-05 13:36:26 +08:00
parent e7503dfe74
commit 1fd5a40b05

View File

@ -0,0 +1,33 @@
services:
windows:
image: dockurr/windows:4.07
container_name: windows_server
environment:
VERSION: "2025" # 选择 Windows Server 2025
DISK_SIZE: "200G" # 设置硬盘大小为200GB
CPU_CORES: "6" # 设置CPU核心数为6
RAM_SIZE: "5G" # 设置内存大小为5GB
DHCP: "Y" # 启用DHCP从路由器获取IP地址
USERNAME: "Zengtudor" # 设置用户名为 Zengtudor
PASSWORD: "Zengtudor" # 设置密码为 Zengtudor
devices:
- /dev/kvm # KVM加速
- /dev/vhost-net # vhost-net 设备支持
stop_grace_period: 60s
cap_add:
- NET_ADMIN # 网络管理权限
volumes:
- /root/mcwin:/storage # 将虚拟磁盘存储到 /root/mcwin
networks:
vlan: # 使用macvlan网络
ipv4_address: 192.168.2.100 # 该IP地址会由路由器分配可选如果使用DHCP则可不设置
networks:
vlan:
driver: macvlan
driver_opts:
parent: eno1 # 使用你的主要网络接口eno1
ipam:
config:
- subnet: 192.168.2.0/24 # 根据你的网络设置调整
gateway: 192.168.2.1 # 适当设置你的网关