Skip to main content

Overview

Datoso provides an official Docker image for easy deployment and consistent environments. The Docker image comes pre-installed with all official seeds and dependencies.

Official Dockerfile

The official Dockerfile is available in the Datoso repository and provides:
  • Python 3.12 slim base image
  • All official Datoso seeds pre-installed
  • Required system dependencies (wget, curl)
  • Virtual environment for isolated Python packages

Quick Start

Pull and Run

# Pull the latest image (when available on Docker Hub)
docker pull laromicas/datoso:latest

# Run with default command
docker run laromicas/datoso --help

Build from Source

# Clone the repository
git clone https://github.com/laromicas/datoso
cd datoso

# Build the image
docker build -t datoso .

# Run the container
docker run datoso --help

Image Details

The Dockerfile structure:
FROM python:3.12-slim
WORKDIR /datoso

RUN apt-get update && apt-get install -y \
    wget \
    curl \
    && rm -rf /var/lib/apt/lists/*

ENV PATH="/datoso/venv/bin:$PATH"
RUN python -m venv venv
RUN . venv/bin/activate
RUN pip install --upgrade pip
RUN pip install setuptools
RUN pip install datoso[all]

ENTRYPOINT ["datoso"]

Key Features

  • Base Image: python:3.12-slim for minimal size
  • Working Directory: /datoso
  • Virtual Environment: Isolated Python environment at /datoso/venv
  • Dependencies: Includes wget and curl for downloads
  • Pre-installed: All official seeds via datoso[all]
  • Entry Point: datoso command

Usage Examples

Basic Commands

# Show version
docker run datoso --version

# List installed seeds
docker run datoso seed installed

# Show help
docker run datoso --help

Fetching DATs

# Fetch dats from a specific seed
docker run datoso redump --fetch

# Fetch with filter
docker run datoso nointro --fetch --filter "Nintendo"

# Fetch with verbose output
docker run datoso fbneo --fetch -v

Processing DATs

# Process dats
docker run datoso redump --process

# Process with filter
docker run datoso nointro --process --filter "Nintendo"

Volume Mounts

To persist data and configuration, mount volumes:

Configuration Directory

Mount your configuration directory:
docker run -v ~/.config/datoso:/root/.config/datoso datoso config

DAT Files

Mount your DAT directory:
docker run \
  -v ~/.config/datoso:/root/.config/datoso \
  -v ~/ROMVault/DatRoot:/datoso/dats \
  datoso redump --fetch --process

Download Cache

Mount the download cache directory:
docker run \
  -v ~/.config/datoso:/root/.config/datoso \
  -v ~/.datoso/dats:/root/.datoso/dats \
  -v ~/ROMVault/DatRoot:/datoso/dats \
  datoso redump --fetch

Complete Setup

Docker Compose

Create a docker-compose.yml file:
version: '3.8'

services:
  datoso:
    image: datoso
    build: .
    volumes:
      # Configuration
      - ~/.config/datoso:/root/.config/datoso
      # Download cache
      - ~/.datoso/dats:/root/.datoso/dats
      # DAT output directory
      - ~/ROMVault/DatRoot:/datoso/dats
    environment:
      # Optional: Override configuration via environment variables
      - PATHS.DATPATH=/datoso/dats
      - LOG.LOGGING=true
      - LOG.LOGLEVEL=INFO
    command: ["--help"]
Run with Docker Compose:
# Build and run
docker-compose up

# Run specific seed
docker-compose run datoso redump --fetch

# Run with custom command
docker-compose run datoso config

Environment Variables

Override configuration using environment variables:
docker run \
  -e PATHS.DATPATH=/datoso/dats \
  -e LOG.LOGGING=true \
  -e LOG.LOGLEVEL=DEBUG \
  -e DOWNLOAD.WORKERS=15 \
  -v ~/.config/datoso:/root/.config/datoso \
  datoso config
Format: <SECTION>.<OPTION>=<value> Common environment variables:
VariableDescriptionExample
PATHS.DATPATHDAT output directory/datoso/dats
PATHS.DOWNLOADPATHDownload cache directory/root/.datoso/dats
LOG.LOGGINGEnable loggingtrue
LOG.LOGLEVELLog levelDEBUG
DOWNLOAD.WORKERSConcurrent downloads10
COMMAND.VERBOSEVerbose outputtrue

Custom Image

Adding Additional Seeds

Create a custom Dockerfile:
FROM python:3.12-slim
WORKDIR /datoso

RUN apt-get update && apt-get install -y \
    wget \
    curl \
    aria2 \
    && rm -rf /var/lib/apt/lists/*

ENV PATH="/datoso/venv/bin:$PATH"
RUN python -m venv venv
RUN . venv/bin/activate

RUN pip install --upgrade pip
RUN pip install setuptools

# Install base datoso
RUN pip install datoso

# Install only specific seeds
RUN pip install datoso-seed-redump
RUN pip install datoso-seed-nointro
RUN pip install datoso-seed-fbneo

# Or install your custom seed
RUN pip install datoso-seed-mycustom

ENTRYPOINT ["datoso"]

Pre-configured Image

Include a pre-configured datoso.config:
FROM python:3.12-slim
WORKDIR /datoso

# ... [install steps] ...

# Copy configuration
COPY datoso.config /root/.config/datoso/datoso.config

ENTRYPOINT ["datoso"]

Best Practices

Always mount volumes for:
  • Configuration (~/.config/datoso)
  • Download cache (~/.datoso/dats)
  • DAT output directory (~/ROMVault/DatRoot)
This ensures data persistence across container restarts.
Limit CPU and memory usage for long-running operations:
docker run \
  --cpus="2.0" \
  --memory="4g" \
  -v ~/.config/datoso:/root/.config/datoso \
  datoso redump --fetch --process
For better management, use named Docker volumes:
docker volume create datoso-config
docker volume create datoso-cache

docker run \
  -v datoso-config:/root/.config/datoso \
  -v datoso-cache:/root/.datoso/dats \
  datoso config
For better security, create a non-root user:
FROM python:3.12-slim
WORKDIR /datoso

# Create datoso user
RUN useradd -m -u 1000 datoso

# ... [install steps] ...

USER datoso
ENTRYPOINT ["datoso"]
Mount a log directory for persistent logs:
docker run \
  -v ~/.config/datoso:/root/.config/datoso \
  -v ~/datoso-logs:/var/log/datoso \
  -e LOG.LOGGING=true \
  -e LOG.LOGFILE=/var/log/datoso/datoso.log \
  datoso redump --fetch -v

Automated Workflows

Scheduled Updates

Use cron or a container scheduler to automate DAT updates:
# Crontab entry (daily at 2 AM)
0 2 * * * docker run \
  -v ~/.config/datoso:/root/.config/datoso \
  -v ~/ROMVault/DatRoot:/datoso/dats \
  datoso all --fetch --process

CI/CD Integration

Example GitHub Actions workflow:
name: Update DATs

on:
  schedule:
    - cron: '0 2 * * *'  # Daily at 2 AM
  workflow_dispatch:

jobs:
  update-dats:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      
      - name: Build Datoso
        run: docker build -t datoso .
      
      - name: Fetch DATs
        run: |
          docker run \
            -v ${{ github.workspace }}/dats:/datoso/dats \
            datoso redump --fetch
      
      - name: Process DATs
        run: |
          docker run \
            -v ${{ github.workspace }}/dats:/datoso/dats \
            datoso redump --process

Troubleshooting

If you encounter permission issues with mounted volumes, ensure the container user has appropriate permissions or run with --user flag.

Common Issues

Solution: Run with user permissions matching your host:
docker run \
  --user $(id -u):$(id -g) \
  -v ~/.config/datoso:/root/.config/datoso \
  datoso config
Solution: Verify volume mount paths and ensure directories exist on host:
mkdir -p ~/.config/datoso
mkdir -p ~/ROMVault/DatRoot
Solution: Use host network mode for direct network access:
docker run --network host datoso redump --fetch

Next Steps

Configuration

Configure Datoso settings

Troubleshooting

Debug issues and errors

Build docs developers (and LLMs) love