mcdosbox-x/docker-compose.yml
Ryan Malloy b022f6fb9e Switch to lokkju/dosbox-x-remotedebug fork for working GDB server
- Use remotedebug branch which adds GDB/QMP server support
- Build with --enable-remotedebug configure flag
- Add proper GDB handshake (qSupported) to gdb_client.py
- Support no-ack mode for faster communication
- Expose QMP port 4444 in addition to GDB port 1234

The GDB server is configured via [dosbox] section:
  gdbserver = true
  gdbserver port = 1234
  qmpserver = true
  qmpserver port = 4444

Tested features: register read, memory read, breakpoints
2026-01-27 14:55:53 -07:00

97 lines
2.4 KiB
YAML

# 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)
# 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