绿联私有云Docker安装Windows
最后更新于:2024-08-11 19:32:16
更换镜像源
https://docker.m.daocloud.io
拉取镜像
louislam/dockge:1
首先通过脚本在绿联NAS 上安装 docker-compose :
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
#检验安装是否完成
docker compose version
新建txt,以下代码贴进去后,保存为 compose.yaml 上传到dockge文件夹下面
version: "3.8"
services:
dockge:
image: dockurr/windows
container_name: windows
devices:
- /dev/kvm
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 3389:3389/tcp
- 3389:3389/udp
volumes:
- ./data:/storage
environment:
#VERSION: "ltsc10"
RAM_SIZE: "4G"
CPU_CORES: "2"
DISK_SIZE: "256G"
stop_grace_period: 2m
restart: unless-stopped
networks: {}
将下载下来的win10镜像改名为custom.iso 上传到 dockge/data文件夹下面
进入dockge目录下执行启动命令
docker compose up -d
compose.yaml里面写8006端口为访问Windows 虚拟机
http://IP:8006/