github代码空间部署免费的RDP服务器

项目地址:dockurr/windows

命令

切换为超级管理员(root用户)

1
sudo su

刷新软件仓库的列表

1
sudo apt update

安装Docker引擎和工具

1
sudo apt install docker.io docker-compose

创建名为dockercom的文件夹

1
mkdir dockercom

进入刚创建的dockercom目录

1
cd dockercom

创建并编辑文件

1
2

nano windows10.yml
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
services:
windows:
image: dockurr/windows
container_name: windows
environment:
VERSION: "10l"
USERNAME: "apepine"
PASSWORD: "apepine123"
RAM_SIZE: "4G"
CPU_CORES: "4"
DISK_SIZE: "400G"
DISK2_SIZE: "100G"
LANGUAGE: "Chinese"
REGION: "zh_CN"
KEYBOARD: "cn"

devices:
- /dev/kvm
- /dev/net/tun
cap_add:
- NET_ADMIN
ports:
- "8006:8006"
- "3389:3389/tcp"
- "3389:3389/udp"
stop_grace_period: 2m

根据YAML文件启动容器

1
sudo docker-compose -f windows10.yml up