dockur / windows

Windows inside a Docker container.
MIT License
16.91k stars 1.43k forks source link

docker compose error #675

Closed sojab0on closed 3 weeks ago

sojab0on commented 1 month ago

Operating system

ubuntu 22.04.1 LTS

Description

when running a docker compose file with the basics on this git hub it errors on running

The Compose file './docker-compose.yml' is invalid because: Unsupported config option for services: 'windows'

Docker compose

services: windows: image: dockurr/windows container_name: windows environment: VERSION: "win10" devices:

Docker log

have no logs the container is not created due to the unsiported error in the compose file it self

Screenshots (optional)

No response

xsy420 commented 1 month ago

check your indent

sojab0on commented 1 month ago

Strange thing was its directly copy from the code page with the copy button

only ting i did was nano docker-compose.yml pasted in that and save it

xsy420 commented 1 month ago

what is your docker compose version? try to upgrade your docker compose or try to add

version: "3"

on the top of docker-compose.yml

sojab0on commented 1 month ago

I run 2.28.1-1 of docker compose plugin and 1.25.0-1 of compose it self (there is no newer version in the repo of ubuntu ) in ubuntu 22.04.1 lts if i put the version line on top it /usr/local/bin/docker-compose: line 1: Not: command not found

After a upgrade trough the default docker install guide to 2.29.1 it runs the compuse now

i tried setting up the volumes:

fixed that eventually but the yml now gets back that volumes needs to be mpping


version: "3"
services:
  windows:
    image: dockurr/windows
    container_name: windows10
    environment:
      VERSION: win10
      language: Dutch
volumes:
  - /var/win:/storage
devices:
  - /dev/kvm
cap_add:
  - NET_ADMIN
ports:
  - 8006:8006
  - 3389:3389/tcp
  - 3389:3389/udp
stop_grace_period: 2m
this is the yml as it is now 
gylfirst commented 3 weeks ago

You need to have the volumes and all under the 'windows' service:

version: "3"
services:
  windows:
    image: dockurr/windows
    container_name: windows10
    environment:
      VERSION: win10
      language: Dutch
    volumes:
      - /var/win:/storage
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    stop_grace_period: 2m

You can check docker compose documentation.

Hope that it helps you.