0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

DockerでWindowsServer環境を作る

Last updated at Posted at 2025-02-15

概要

表題の通り、DockerでWindowsServer環境を作成します。
WindowsServer以外にも通常のWindows環境も作れる方法です。

環境

  • Windows11
  • Docker

使うもの

実践

リポジトリをクローン

git clone https://github.com/dockur/windows

composeファイルを修正

VERSIONで作成したい環境を指定できます。
今回はWindowsServer2022を指定
Windows11をインストールしたい場合は"11"と設定します。
KVMは使用しない、メモリはとりあえず動けばいいのでテキトーです。

version: "3"
services:
  windows:
    image: dockurr/windows
    container_name: wincontainer
    environment:
      KVM: "N"
      RAM_SIZE: "16G"
      CPU_CORES: "8"
      VERSION: "2022"
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    stop_grace_period: 2m
    restart: on-failure

docker compose up

docker compose upを実行します。

docker compose up

Windowsにアクセス

コンテナに入ってWindowsのセットアップを行います。
簡単ですね
デフォルトでnoVNCによるブラウザ経由のアクセスができますが、RDPによるアクセスもできます。

http://localhost:8006/

終わり

簡単ですね。
注意点としてはAppleSilicon環境ではWindowsのバージョンによっては動作しないことや不安定なことがあります。

また、私は今のところ、仮想環境でもAppleSiliconではArm環境しか作成できてないです。
UTMやVirtualBoxなどいろいろ試しているのですがうまくいかず。。。。。
いい方法ないかしらねって感じです

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?