2025-01-05 05:36:26 +00:00
|
|
|
|
services:
|
|
|
|
|
windows:
|
|
|
|
|
image: dockurr/windows:4.07
|
|
|
|
|
container_name: windows_server
|
|
|
|
|
environment:
|
2025-01-05 05:38:39 +00:00
|
|
|
|
VERSION: "2022" # 选择 Windows Server 2025
|
2025-01-05 05:36:26 +00:00
|
|
|
|
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 # 适当设置你的网关
|