[新软件] Linux中运行Windows Docker

date
Feb 21, 2024
slug
newsoftware-WINDOWS-on-Linux
status
Published
summary
新软件-
tags
software
type
Post
 
 

Summary

  • kvm 是linux上特有

安装过程

export DOCKER_PROJ=dockurr_windows
export DOCKER_PROJ_DOMAIN=$DOCKER_PROJ.xxx.xxx

mkdir -p /data/$DOCKER_PROJ
cd /data/$DOCKER_PROJ

cat > docker-compose.yml <<EOF
version: "3"
services:
  windows:
    image: dockurr/windows
    container_name: windows
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    stop_grace_period: 2m
    volumes:
        - ./storage:/storage
    restart: on-failure
    environment:
      VERSION: "win11"
      RAM_SIZE: "8G"
      CPU_CORES: "4"
      DISK_SIZE: "64G"
networks:
  default:
    name: npm_nginx_proxy_manager-network
    external: true
EOF

docker-compose down; docker-compose up -d; sleep 1s; docker-compose logs -f
 

How do I verify if my system supports KVM?

To verify if your system supports KVM, run the following commands:
sudo apt install cpu-checker sudo kvm-ok
 
notion image

截图

notion image
 
notion image
 

© Ying Bun 2021 - 2024