Skip to main content

Dockseed

Dockseed is a deterministic Python developer tool that inspects an existing Python project and generates a project-specific, best-practice Dockerfile and .dockerignore automatically.

Key Features

  • Evidence-Based Detection: Inspects pyproject.toml, requirements.txt, Pipfile, .python-version, .tool-versions, and runtime.txt to resolve compatible Python versions (3.10–3.14).
  • Modern Package Manager Support: Automatically configures layer-cached dependency installation for pip, uv, Poetry, PDM, Hatch, and Pipenv.
  • Safe AST Static Analysis: Discovers application entry points (FastAPI, Flask, Django, Streamlit, Gradio, Celery, CLI scripts, and standalone scripts) using Python's built-in ast module—never importing or executing project code.
  • Native System Dependency Heuristics: Detects packages requiring C extensions or shared libraries (psycopg2, mysqlclient, opencv-python, pyaudio, git+https, etc.) and injects clean apt-get layers.
  • Secure & Production-Minded Defaults: Generates single-stage python:3.x-slim images running as an unprivileged appuser, using JSON exec-form CMD arrays for proper SIGTERM signal handling, and excluding .env secrets and virtual environments.
  • CI/CD & Headless Ready: Deterministic output, explicit CLI override flags, and strict exit codes.

Installation

pip install dockseed

Or run directly with uvx or pipx:

uvx dockseed scan

CLI Usage

1. Analyze a Project (dockseed scan)

Inspect a project without modifying any files:

dockseed scan
dockseed scan ./my-project
dockseed scan --format json

2. Generate Configuration (dockseed init)

Generate a Dockerfile and .dockerignore:

dockseed init
dockseed init --dry-run
dockseed init --yes
dockseed init --overwrite
dockseed init --no-comments

Bypass ambiguity prompts in CI/CD pipelines using explicit override flags:

dockseed init --yes \
  --python 3.12 \
  --package-manager uv \
  --entrypoint "app.main:app" \
  --port 8000

3. Validate Configuration (dockseed check)

Validate an existing Dockerfile and .dockerignore statically, or perform an opt-in container build check:

dockseed check
dockseed check --build
dockseed check --build --runtime podman

Python API

Dockseed's scanning, generation, and validation engine can be used directly from Python:

from pathlib import Path
from dockseed import (
    scan_project,
    generate_dockerfile,
    generate_dockerignore,
    validate_dockerfile,
)

model = scan_project(Path("."))
dockerfile = generate_dockerfile(model, include_comments=True)
dockerignore = generate_dockerignore(model)

report = validate_dockerfile(dockerfile.content, model, dockerignore.content)
if report.is_valid:
    print(dockerfile.content)

Exit Codes

Exit Code Constant Meaning
0 SUCCESS Operation succeeded.
1 GENERAL_ERROR Unexpected runtime or I/O error.
2 VALIDATION_FAILED Static/build validation failed, or containerization blocker detected.
3 AMBIGUITY_UNRESOLVED Unresolved critical ambiguity in non-interactive (--yes or non-TTY) mode.
4 OVERWRITE_BLOCKED Target Dockerfile already exists and --overwrite was not passed.

License

MIT

Metadata

Release files for dockseed 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dockseed 0.1.0
File Size Uploaded Provenance Actions
dockseed-0.1.0.tar.gz 29.2 kB Without provenance Details for dockseed-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dockseed 0.1.0
File Interpreter ABI Platform Actions
dockseed-0.1.0-py3-none-any.whl Python 3 none any Details for dockseed-0.1.0-py3-none-any.whl

Total release size: 66.5 kB

Release files / dockseed-0.1.0.tar.gz

Download URL dockseed-0.1.0.tar.gz
Size 29.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ab6fcae48e6fc6ce2c0c4569392e20b787ca6284a1b076b9d3bb340b9a61c34e
BLAKE2b-256 checksum
How to use checksums
67c590d0e14960cc69b58ad7e1bb4d8af9d597f2304e5eada9c4c0e36843578d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.4 Linux/7.0.0-38-generic

Release files / dockseed-0.1.0-py3-none-any.whl

Download URL dockseed-0.1.0-py3-none-any.whl
Size 37.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1852d47df23bb8235eb70f2a22b376b94913ed7e6a71ac201461e427a7bdb55
BLAKE2b-256 checksum
How to use checksums
a702b63a0b3a0ba60077066cd706367d21a5c9cace68d212ac062986aee29f2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.4 Linux/7.0.0-38-generic

Security for dockseed 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page