dockur / windows

Windows inside a Docker container.
MIT License
17.49k stars 1.5k forks source link

Create a Windows container as a network attached on Lan by macvlan #762

Closed Acwildweb closed 7 hours ago

Acwildweb commented 4 days ago

Operating system

Ubuntu 24.04

Description

hi, I tried several times to install docker trying to integrate the following information in order to use the previously created macvlan: services: windows: container_name: windows .... networks: vlan: ipv4_address: 192.168.178.2

networks: vlan: external: true my macvlan is named as macacwild a50453331d0 macacwild macvlan local

after docker-compose up i see the error on log. Can you help me? And Can you confirm this docker-compose file connect the virtual image at the macvlan to the gateway for connecting on internet just like a real pc on my lan?

Docker compose

services: windows: image: dockurr/windows container_name: windows networks: macacwild: ipv4_address: 192.168.178.2 networks: macacwild: external: true environment: VERSION: "win11" LANGUAGE: "Italian" REGION: "it-IT" KEYBOARD: "it-IT" DISK_SIZE: "128G" RAM_SIZE: "8G" CPU_CORES: "2" devices:

Docker log

ERROR: The Compose file './docker-compose.yml' is invalid because: networks.macacwild value 'cap_add', 'devices', 'environment', 'ports', 'stop_grace_period' do not match any of the regexes: '^x-'

Screenshots (optional)

No response

kroese commented 4 days ago

This compose file is completely invalid? For example, this stuff needs to be at the bottom:

networks:
  macacwild:
    external: true
Acwildweb commented 3 days ago

Hi Kroese thanks for the answer. Could you write me the correctly edited compose directly as I'm new to using docker compose so I wouldn't know how to correct the file. From what you write, I think that the error you pointed out to me is not the only one.

Acwildweb commented 1 day ago

even though I received almost no support, thanks to chat gpt I corrected the errors on the compose which I make available here for anyone who might need it: services: ` GNU nano 7.2 docker-compose.yml
services: windows: image: dockurr/windows container_name: windows volumes:

kroese commented 7 hours ago

Great!