# DOSBox-X MCP Docker Compose # # Usage: # docker compose up -d # Start DOSBox-X # docker compose logs -f # View logs # docker compose down # Stop # # For GUI (X11 forwarding): # xhost +local:docker # Allow Docker X11 access # docker compose up -d services: dosbox: build: context: . dockerfile: Dockerfile container_name: dosbox-mcp # Ports (remotedebug fork exposes these when built with --enable-remotedebug) ports: - "${GDB_PORT:-1234}:1234" # GDB server (standard GDB remote protocol) - "${QMP_PORT:-4444}:4444" # QMP server (QEMU Machine Protocol) - "5555:5555" # Serial nullmodem for RIPscrip input # X11 forwarding for display environment: - DISPLAY=${DISPLAY:-:0} volumes: - /tmp/.X11-unix:/tmp/.X11-unix:rw - ${XDG_RUNTIME_DIR:-/run/user/1000}:${XDG_RUNTIME_DIR:-/run/user/1000}:rw # DOS files directory - ${DOS_DIR:-./dos}:/dos:rw # Custom config (optional) - ${CONFIG_FILE:-./config/dosbox.conf}:/config/dosbox.conf:ro # Audio (PulseAudio) devices: - /dev/snd:/dev/snd # For PulseAudio sound # Uncomment if you want sound support: # - ${XDG_RUNTIME_DIR}/pulse:/run/user/1000/pulse:rw # Run options stdin_open: true tty: true # Resource limits deploy: resources: limits: cpus: '2' memory: 1G # Healthcheck - verify GDB port is listening healthcheck: test: ["CMD-SHELL", "nc -z localhost 1234 || exit 1"] interval: 10s timeout: 5s retries: 3 start_period: 30s # Restart policy restart: unless-stopped # Optional: Separate container for headless operation dosbox-headless: build: context: . dockerfile: Dockerfile container_name: dosbox-mcp-headless profiles: - headless ports: - "${GDB_PORT_HEADLESS:-1235}:1234" # GDB server - "${QMP_PORT_HEADLESS:-4445}:4444" # QMP server environment: # Use virtual framebuffer for headless - SDL_VIDEODRIVER=dummy - SDL_AUDIODRIVER=dummy volumes: - ${DOS_DIR:-./dos}:/dos:rw - ${CONFIG_FILE:-./config/dosbox.conf}:/config/dosbox.conf:ro stdin_open: true tty: true deploy: resources: limits: cpus: '1' memory: 512M