Dataset Viewer
Auto-converted to Parquet Duplicate
id
string
title
string
summary
string
failure_type
string
ecosystem
string
difficulty
string
tags
list
files
list
failure_log
list
build
dict
verify
dict
oracle_patch
list
scoring
dict
split
string
sbd-0001
Python image forgets requirements.txt
The Dockerfile installs from requirements.txt before that file exists inside the build context layer.
missing_build_context_file
python
easy
[ "dockerfile", "python", "build-context", "pip" ]
[ { "path": "Dockerfile", "content": [ "FROM python:3.12-slim", "WORKDIR /app", "COPY app.py .", "RUN pip install --no-cache-dir -r requirements.txt", "CMD [\"python\", \"app.py\"]" ] }, { "path": "requirements.txt", "content": [ "flask==3.0.3" ] }, ...
[ "Step 4/5 : RUN pip install --no-cache-dir -r requirements.txt", "ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'" ]
{ "command": "docker build -t sabnock/sbd-0001 ." }
{ "commands": [ "docker build -t sabnock/sbd-0001 ." ] }
[ "diff --git a/Dockerfile b/Dockerfile", "--- a/Dockerfile", "+++ b/Dockerfile", "@@ -1,5 +1,6 @@", " FROM python:3.12-slim", " WORKDIR /app", "-COPY app.py .", "+COPY requirements.txt .", " RUN pip install --no-cache-dir -r requirements.txt", "+COPY app.py .", " CMD [\"python\", \"app.py\"]" ]
{ "must_touch": [ "Dockerfile" ], "must_contain": [ { "path": "Dockerfile", "text": "COPY requirements.txt ." } ], "must_not_contain": [] }
seed
sbd-0002
Node image uses npm ci without a lockfile
The project has only package.json, but the Dockerfile uses npm ci, which requires a package-lock.json or npm-shrinkwrap.json.
lockfile_missing
node
easy
[ "dockerfile", "node", "npm", "lockfile" ]
[ { "path": "Dockerfile", "content": [ "FROM node:22-alpine", "WORKDIR /app", "COPY package.json .", "RUN npm ci --omit=dev", "COPY index.js .", "CMD [\"node\", \"index.js\"]" ] }, { "path": "package.json", "content": [ "{\"scripts\":{\"start\":\"node ...
[ "npm ERR! code EUSAGE", "npm ERR! The `npm ci` command can only install with an existing package-lock.json or npm-shrinkwrap.json." ]
{ "command": "docker build -t sabnock/sbd-0002 ." }
{ "commands": [ "docker build -t sabnock/sbd-0002 ." ] }
[ "diff --git a/Dockerfile b/Dockerfile", "--- a/Dockerfile", "+++ b/Dockerfile", "@@ -1,6 +1,6 @@", " FROM node:22-alpine", " WORKDIR /app", " COPY package.json .", "-RUN npm ci --omit=dev", "+RUN npm install --omit=dev", " COPY index.js .", " CMD [\"node\", \"index.js\"]" ]
{ "must_touch": [ "Dockerfile" ], "must_contain": [ { "path": "Dockerfile", "text": "RUN npm install --omit=dev" } ], "must_not_contain": [] }
seed
sbd-0003
Go multi-stage build copies the wrong binary
The builder stage writes /out/server, but the runtime stage tries to copy and execute /out/api.
multistage_artifact_mismatch
go
easy
[ "dockerfile", "go", "multi-stage", "copy" ]
[ { "path": "Dockerfile", "content": [ "FROM golang:1.23-alpine AS build", "WORKDIR /src", "COPY go.mod ./", "COPY main.go ./", "RUN go build -o /out/server ./...", "FROM alpine:3.20", "COPY --from=build /out/api /usr/local/bin/api", "CMD [\"api\"]" ] }, ...
[ "failed to solve: failed to compute cache key: failed to calculate checksum of ref: \"/out/api\": not found" ]
{ "command": "docker build -t sabnock/sbd-0003 ." }
{ "commands": [ "docker build -t sabnock/sbd-0003 ." ] }
[ "diff --git a/Dockerfile b/Dockerfile", "--- a/Dockerfile", "+++ b/Dockerfile", "@@ -3,6 +3,6 @@", " COPY go.mod ./", " COPY main.go ./", " RUN go build -o /out/server ./...", " FROM alpine:3.20", "-COPY --from=build /out/api /usr/local/bin/api", "-CMD [\"api\"]", "+COPY --from=build /out/server...
{ "must_touch": [ "Dockerfile" ], "must_contain": [ { "path": "Dockerfile", "text": "/out/server /usr/local/bin/server" }, { "path": "Dockerfile", "text": "CMD [\"server\"]" } ], "must_not_contain": [] }
seed
sbd-0004
Compose API starts before Postgres is ready
depends_on only controls startup order. The API starts while Postgres is still initializing, so integration tests see connection refused.
compose_readiness
compose
medium
[ "compose", "postgres", "healthcheck", "integration-test" ]
[ { "path": "docker-compose.yml", "content": [ "services:", " api:", " build: .", " environment:", " DATABASE_URL: postgres://postgres:postgres@db:5432/postgres", " depends_on:", " - db", " db:", " image: postgres:16-alpine", ...
[ "api-1 | psycopg.OperationalError: connection failed: Connection refused", "db-1 | database system is ready to accept connections" ]
{ "command": "docker compose up --build --abort-on-container-exit" }
{ "commands": [ "docker compose config --quiet" ] }
[ "diff --git a/docker-compose.yml b/docker-compose.yml", "--- a/docker-compose.yml", "+++ b/docker-compose.yml", "@@ -1,11 +1,16 @@", " services:", " api:", " build: .", " environment:", " DATABASE_URL: postgres://postgres:postgres@db:5432/postgres", " depends_on:", "- - ...
{ "must_touch": [ "docker-compose.yml" ], "must_contain": [ { "path": "docker-compose.yml", "text": "condition: service_healthy" }, { "path": "docker-compose.yml", "text": "pg_isready -U postgres" } ], "must_not_contain": [] }
seed
sbd-0005
.dockerignore excludes the production dist directory
The image is supposed to serve an already-built static site, but .dockerignore removes dist from the build context.
dockerignore_artifact_excluded
frontend
easy
[ "dockerfile", "dockerignore", "nginx", "static-site" ]
[ { "path": "Dockerfile", "content": [ "FROM nginx:1.27-alpine", "COPY dist/ /usr/share/nginx/html/" ] }, { "path": ".dockerignore", "content": [ "node_modules", "dist" ] }, { "path": "dist/index.html", "content": [ "<!doctype html>", "<html>...
[ "failed to compute cache key: failed to calculate checksum of ref: \"/dist\": not found" ]
{ "command": "docker build -t sabnock/sbd-0005 ." }
{ "commands": [ "docker build -t sabnock/sbd-0005 ." ] }
[ "diff --git a/.dockerignore b/.dockerignore", "--- a/.dockerignore", "+++ b/.dockerignore", "@@ -1,2 +1 @@", " node_modules", "-dist" ]
{ "must_touch": [ ".dockerignore" ], "must_contain": [], "must_not_contain": [ { "path": ".dockerignore", "text": "dist" } ] }
seed
sbd-0006
Rust Alpine build misses OpenSSL native packages
The crate depends on openssl, but the Alpine builder does not install the native headers and pkg-config needed by openssl-sys.
native_dependency_missing
rust
medium
[ "dockerfile", "rust", "alpine", "openssl", "native-deps" ]
[ { "path": "Dockerfile", "content": [ "FROM rust:1.79-alpine AS build", "WORKDIR /src", "COPY Cargo.toml .", "RUN cargo fetch", "COPY src ./src", "RUN cargo build --release" ] }, { "path": "Cargo.toml", "content": [ "[package]", "name = \"sbd000...
[ "error: failed to run custom build command for `openssl-sys`", "Could not find directory of OpenSSL installation, and this `-sys` crate cannot proceed without this knowledge." ]
{ "command": "docker build -t sabnock/sbd-0006 ." }
{ "commands": [ "docker build -t sabnock/sbd-0006 ." ] }
[ "diff --git a/Dockerfile b/Dockerfile", "--- a/Dockerfile", "+++ b/Dockerfile", "@@ -1,6 +1,7 @@", " FROM rust:1.79-alpine AS build", " WORKDIR /src", "+RUN apk add --no-cache musl-dev pkgconfig openssl-dev", " COPY Cargo.toml .", " RUN cargo fetch", " COPY src ./src", " RUN cargo build --releas...
{ "must_touch": [ "Dockerfile" ], "must_contain": [ { "path": "Dockerfile", "text": "apk add --no-cache musl-dev pkgconfig openssl-dev" } ], "must_not_contain": [] }
seed
sbd-0007
Python src layout is not importable in the container
The app lives under src/app, but the container runs python -m app without adding /app/src to PYTHONPATH.
python_src_layout_import
python
easy
[ "dockerfile", "python", "src-layout", "runtime" ]
[ { "path": "Dockerfile", "content": [ "FROM python:3.12-slim", "WORKDIR /app", "COPY requirements.txt .", "RUN pip install --no-cache-dir -r requirements.txt", "COPY src ./src", "CMD [\"python\", \"-m\", \"app\"]" ] }, { "path": "requirements.txt", "content...
[ "/usr/local/bin/python: No module named app" ]
{ "command": "docker build -t sabnock/sbd-0007 ." }
{ "commands": [ "docker build -t sabnock/sbd-0007 .", "docker run --rm sabnock/sbd-0007" ] }
[ "diff --git a/Dockerfile b/Dockerfile", "--- a/Dockerfile", "+++ b/Dockerfile", "@@ -3,4 +3,5 @@", " COPY requirements.txt .", " RUN pip install --no-cache-dir -r requirements.txt", " COPY src ./src", "+ENV PYTHONPATH=/app/src", " CMD [\"python\", \"-m\", \"app\"]" ]
{ "must_touch": [ "Dockerfile" ], "must_contain": [ { "path": "Dockerfile", "text": "ENV PYTHONPATH=/app/src" } ], "must_not_contain": [] }
seed
sbd-0008
Poetry install tries to install the app before source files exist
The Dockerfile copies only pyproject.toml, then runs poetry install. Poetry attempts to install the root project and fails because package metadata/source files are not present yet.
poetry_root_install_order
python
medium
[ "dockerfile", "python", "poetry", "dependency-install" ]
[ { "path": "Dockerfile", "content": [ "FROM python:3.12-slim", "WORKDIR /app", "RUN pip install --no-cache-dir poetry==1.8.3", "COPY pyproject.toml ./", "RUN poetry install --only main", "COPY service ./service", "CMD [\"poetry\", \"run\", \"python\", \"-m\", \"servi...
[ "Installing the current project: sbd0008 (0.1.0)", "Error: The current project could not be installed: No file/folder found for package service" ]
{ "command": "docker build -t sabnock/sbd-0008 ." }
{ "commands": [ "docker build -t sabnock/sbd-0008 ." ] }
[ "diff --git a/Dockerfile b/Dockerfile", "--- a/Dockerfile", "+++ b/Dockerfile", "@@ -2,6 +2,6 @@", " WORKDIR /app", " RUN pip install --no-cache-dir poetry==1.8.3", " COPY pyproject.toml ./", "-RUN poetry install --only main", "+RUN poetry install --only main --no-root", " COPY service ./service",...
{ "must_touch": [ "Dockerfile" ], "must_contain": [ { "path": "Dockerfile", "text": "poetry install --only main --no-root" } ], "must_not_contain": [] }
seed
sbd-0009
Compose bind mount hides node_modules from the image
The image installs dependencies, but docker compose bind-mounts the host project over /app. On a clean host without node_modules, runtime imports fail.
compose_bind_mount_masks_dependencies
node
medium
[ "compose", "node", "bind-mount", "node_modules" ]
[ { "path": "docker-compose.yml", "content": [ "services:", " web:", " build: .", " command: npm start", " volumes:", " - .:/app" ] }, { "path": "Dockerfile", "content": [ "FROM node:22-alpine", "WORKDIR /app", "COPY package....
[ "web-1 | Error: Cannot find module 'express'", "web-1 | Require stack: /app/index.js" ]
{ "command": "docker compose up --build" }
{ "commands": [ "docker compose config --quiet" ] }
[ "diff --git a/docker-compose.yml b/docker-compose.yml", "--- a/docker-compose.yml", "+++ b/docker-compose.yml", "@@ -3,4 +3,5 @@", " build: .", " command: npm start", " volumes:", " - .:/app", "+ - /app/node_modules" ]
{ "must_touch": [ "docker-compose.yml" ], "must_contain": [ { "path": "docker-compose.yml", "text": "/app/node_modules" } ], "must_not_contain": [] }
seed
sbd-0010
Dockerfile leaks an npm token through ARG and image layers
The build uses ARG NPM_TOKEN and writes it to .npmrc in a RUN layer. A secure fix should use BuildKit secrets and remove the temporary .npmrc.
build_secret_leak
node
hard
[ "dockerfile", "node", "buildkit", "secrets", "security" ]
[ { "path": "Dockerfile", "content": [ "FROM node:22-alpine", "WORKDIR /app", "ARG NPM_TOKEN", "COPY package*.json ./", "RUN echo \"//registry.npmjs.org/:_authToken=${NPM_TOKEN}\" > .npmrc && npm ci --omit=dev", "COPY index.js .", "CMD [\"node\", \"index.js\"]" ] ...
[ "hadolint: SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data", "security-scan: token material may persist in image layer history" ]
{ "command": "DOCKER_BUILDKIT=1 docker build --secret id=npm_token,src=.npm-token -t sabnock/sbd-0010 ." }
{ "commands": [ "docker buildx build --check ." ] }
[ "diff --git a/Dockerfile b/Dockerfile", "--- a/Dockerfile", "+++ b/Dockerfile", "@@ -1,7 +1,7 @@", "+# syntax=docker/dockerfile:1.7", " FROM node:22-alpine", " WORKDIR /app", "-ARG NPM_TOKEN", " COPY package*.json ./", "-RUN echo \"//registry.npmjs.org/:_authToken=${NPM_TOKEN}\" > .npmrc && npm ci...
{ "must_touch": [ "Dockerfile" ], "must_contain": [ { "path": "Dockerfile", "text": "# syntax=docker/dockerfile:1.7" }, { "path": "Dockerfile", "text": "--mount=type=secret,id=npm_token" }, { "path": "Dockerfile", "text": "rm .npmrc" } ], "must_n...
seed
sbd-0011
Ubuntu image installs apt packages without apt-get update
The package install runs against an image with no fresh package lists, causing apt to fail in a clean build.
apt_update_missing
linux
easy
[ "dockerfile", "apt", "ubuntu", "package-install" ]
[ { "path": "Dockerfile", "content": [ "FROM ubuntu:24.04", "RUN apt-get install -y curl ca-certificates", "CMD [\"curl\", \"--version\"]" ] } ]
[ "Reading package lists...", "E: Unable to locate package curl", "E: Unable to locate package ca-certificates" ]
{ "command": "docker build -t sabnock/sbd-0011 ." }
{ "commands": [ "docker build -t sabnock/sbd-0011 ." ] }
[ "diff --git a/Dockerfile b/Dockerfile", "--- a/Dockerfile", "+++ b/Dockerfile", "@@ -1,3 +1,3 @@", " FROM ubuntu:24.04", "-RUN apt-get install -y curl ca-certificates", "+RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates && rm -rf /var/lib/apt/lists/*", " CMD [\"cur...
{ "must_touch": [ "Dockerfile" ], "must_contain": [ { "path": "Dockerfile", "text": "apt-get update && apt-get install" }, { "path": "Dockerfile", "text": "rm -rf /var/lib/apt/lists/*" } ], "must_not_contain": [] }
seed
sbd-0012
FastAPI container binds to localhost
The app starts inside the container, but Uvicorn binds to 127.0.0.1. Published ports on the host cannot reach it.
container_network_binding
python
easy
[ "dockerfile", "fastapi", "uvicorn", "runtime", "network" ]
[ { "path": "Dockerfile", "content": [ "FROM python:3.12-slim", "WORKDIR /app", "COPY requirements.txt .", "RUN pip install --no-cache-dir -r requirements.txt", "COPY main.py .", "EXPOSE 8000", "CMD [\"uvicorn\", \"main:app\", \"--host\", \"127.0.0.1\", \"--port\", \"...
[ "curl: (56) Recv failure: Connection reset by peer", "container log: Uvicorn running on http://127.0.0.1:8000" ]
{ "command": "docker build -t sabnock/sbd-0012 ." }
{ "commands": [ "docker build -t sabnock/sbd-0012 ." ] }
[ "diff --git a/Dockerfile b/Dockerfile", "--- a/Dockerfile", "+++ b/Dockerfile", "@@ -4,4 +4,4 @@", " RUN pip install --no-cache-dir -r requirements.txt", " COPY main.py .", " EXPOSE 8000", "-CMD [\"uvicorn\", \"main:app\", \"--host\", \"127.0.0.1\", \"--port\", \"8000\"]", "+CMD [\"uvicorn\", \"main...
{ "must_touch": [ "Dockerfile" ], "must_contain": [ { "path": "Dockerfile", "text": "0.0.0.0" } ], "must_not_contain": [] }
seed

Sabnock Docker

Sabnock Docker is a synthetic benchmark for testing whether AI agents can repair real Docker, Compose, and containerized CI failures.

It is built for AI engineers, not model hype. Each task contains a broken mini-repository, failing build/runtime logs, an expected fix, and machine-checkable scoring hints.

Why This Exists

Most coding-agent demos look good until the work touches Docker, Compose, dependency resolution, build context, network binding, secrets, or CI logs. Sabnock Docker targets that exact failure class.

The v1 benchmark contains 108 synthetic tasks covering:

  • Missing build-context files
  • npm ci lockfile failures
  • Multi-stage binary copy mistakes
  • Compose readiness bugs
  • .dockerignore production artifact mistakes
  • Alpine native dependency failures
  • Python src/ layout container bugs
  • Poetry --no-root mistakes
  • Compose bind mounts hiding node_modules
  • BuildKit secret handling
  • apt-get update ordering
  • Container network binding failures

Repo Layout

data/sabnock_docker_seed.json   Hand-written seed tasks
data/sabnock_docker_v1.json     108-task benchmark dataset
data/sabnock_docker_*.json      HF-ready split files
sabnock_docker/                 Loader, validator, scorer, CLI
scripts/build_dataset.py        Deterministic v1 dataset builder
app.py                          Hugging Face Space UI
tests/                          Dataset and scorer smoke tests

Dataset Row Shape

Each row has:

{
  "id": "sbd-0001",
  "split": "seed",
  "title": "Python image forgets requirements.txt",
  "failure_type": "missing_build_context_file",
  "ecosystem": "python",
  "difficulty": "easy",
  "files": [{"path": "Dockerfile", "content": ["FROM python:3.12-slim"]}],
  "failure_log": ["ERROR: Could not open requirements file"],
  "build": {"command": "docker build -t sabnock/sbd-0001 ."},
  "verify": {"commands": ["docker build -t sabnock/sbd-0001 ."]},
  "oracle_patch": ["diff --git a/Dockerfile b/Dockerfile"],
  "scoring": {
    "must_touch": ["Dockerfile"],
    "must_contain": [{"path": "Dockerfile", "text": "COPY requirements.txt ."}],
    "must_not_contain": []
  }
}

The content, failure_log, and oracle_patch fields are arrays of lines so the dataset stays readable on Hugging Face.

Splits

seed        12 hand-written tasks
train       72 generated training/evaluation tasks
validation  12 validation tasks
challenge   12 harder public challenge tasks

The public challenge split is a placeholder for leaderboard-style scoring. For a serious leaderboard, keep future hidden tasks private and run them in a controlled evaluator.

Local Use

Rebuild the v1 dataset:

python3 scripts/build_dataset.py

Validate the dataset:

python3 -m sabnock_docker.cli validate

Print benchmark statistics:

python3 -m sabnock_docker.cli stats

List tasks:

python3 -m sabnock_docker.cli list

Filter tasks:

python3 -m sabnock_docker.cli list --ecosystem compose --difficulty medium

Export a broken task to a directory:

python3 -m sabnock_docker.cli export sbd-0001 /tmp/sbd-0001

Score a proposed patch statically:

python3 -m sabnock_docker.cli score-patch sbd-0001 fix.patch

Verify with Docker locally:

python3 -m sabnock_docker.cli verify sbd-0001 --patch fix.patch

The score-patch command applies the patch to a temp copy of the broken repo and checks the final files. The verify command exports the task, applies the patch with git apply, then runs the task's verification commands. It requires Docker for Docker-backed checks.

Render a Markdown report:

python3 -m sabnock_docker.cli report -o BENCHMARK.md

Score a JSONL agent submission file:

python3 -m sabnock_docker.cli score-submissions submissions.jsonl

See SUBMISSIONS.md and schemas/submission.schema.json for the leaderboard submission format.

Hugging Face Space

Run the browser UI:

pip install -r requirements.txt
python3 app.py

The Space lets people browse tasks, filter the benchmark, inspect files/logs, score a patch, and view a leaderboard scaffold. Docker execution is intentionally local-first because public hosted Spaces should not run arbitrary Docker builds.

Leaderboard Metrics

Recommended metrics:

  • pass_at_1: first-patch success rate
  • patch_apply_rate: whether the patch applies cleanly
  • docker_pass_rate: whether local Docker verification passes
  • median_runtime_seconds: wall time per task
  • mean_patch_lines: patch size
  • cost_usd: approximate model/tool cost

Submission row:

{"agent":"my-agent","task_id":"sbd-0001","patch":"diff --git ...","runtime_seconds":12.4,"cost_usd":0.03}

License

Apache-2.0. All seed tasks are synthetic and original.

Downloads last month
19

Space using Redhanuman/sabnock-docker 1