$npx skillfedfor your agent

dockerfile

Parse a dockerfile into a high-level representation using the official go parser.

With conditionsPyPI Build ToolsReleased Jan 2025358.8K downloads / moMITPlatform wheel

Decision gist · record as of 2026-08-14

platform wheels — dockerfile-3.4.0-cp39-abi3-macosx_13_0_x86_64.whl · dockerfile-3.4.0-cp39-abi3-macosx_14_0_arm64.whl · dockerfile-3.4.0-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
v3.4.0 · released 2025-01-04 · Python >=3.9

Yes, if you need reliable Dockerfile parsing and can accept that the package is archived. The MIT license is permissive, install friction is manageable with prebuilt wheels, and there are no known vulnerabilities. However, be aware that the repository is no longer maintained—if Docker's parser evolves significantly or you encounter edge cases, upstream fixes are unlikely. For new projects, verify that the parsing behavior matches your current Docker version.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >= 3.9.
  • Building from source requires a Go compiler; prebuilt wheels are available for Linux x86_64, macOS (x86_64 and ARM64), and Windows x64.
  • Medium install friction due to compiled extension (requires Go compiler when building from source), but prebuilt wheels are available for common platforms.

License · maintenance · safety

MIT (permissive) — MIT license is permissive and poses no restrictions on commercial or private use, modification, or redistribution.

last release 2025-01-04 (587 days) · last repo commit 2025-01-20 · 105 stars · archived

0 known vulnerabilities (OSV.dev, 2026-08-14) · 358,768 downloads/mo, #7,260 on PyPI

Verify before relying

pip install dockerfile

import dockerfile

cmds = dockerfile.parse_file('Dockerfile')
for cmd in cmds:
    print(cmd.cmd, cmd.value)
  • Whether the archived repository will continue to receive security updates or bug fixes if Docker's parser changes significantly.
  • Performance characteristics when parsing very large or complex Dockerfiles.
Same gist for agents: .md · .json

What it is and what it does

dockerfile is a Python wrapper around Docker's official Dockerfile parser, written in Go. It exposes three main functions: all_cmds() lists valid Dockerfile commands, parse_file() parses a Dockerfile from disk, and parse_string() parses Dockerfile syntax from a string. Each returns a tuple of Command objects with structured fields (cmd, sub_cmd, json flag, original text, line number, flags, and parsed values).

The package is useful for tools that need to analyze or manipulate Dockerfile content programmatically. It has no runtime dependencies and handles parsing errors with specific exception types (GoIOError for file access, GoParseError for syntax). The repository is now archived and unmaintained, though it remains functional for current Python versions.

Use it for

  • Analyze Dockerfile structure in CI/CD pipelines to validate layer counts, base images, or security patterns.
  • Extract environment variables, exposed ports, or entrypoint commands from Dockerfiles for documentation or compliance scanning.
  • Build linting or static analysis tools that inspect Dockerfile syntax and report violations.
  • Programmatically modify or generate Dockerfiles by parsing existing ones and reconstructing them with changes.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need reliable Dockerfile parsing and can accept that the package is archived.

The MIT license is permissive, install friction is manageable with prebuilt wheels, and there are no known vulnerabilities. However, be aware that the repository is no longer maintained—if Docker's parser evolves significantly or you encounter edge cases, upstream fixes are unlikely. For new projects, verify that the parsing behavior matches your current Docker version.

Install

dockerfile on PyPI

Before you install

Medium install friction due to compiled extension (requires Go compiler when building from source), but prebuilt wheels are available for common platforms. Repository is archived and unmaintained as of 587 days since last release, though the latest version was released on 2025-01-04.

Requires Python >= 3.9. Building from source requires a Go compiler; prebuilt wheels are available for Linux x86_64, macOS (x86_64 and ARM64), and Windows x64.

License in practice

MIT license is permissive and poses no restrictions on commercial or private use, modification, or redistribution.

Quickstart

pip install dockerfile

import dockerfile

cmds = dockerfile.parse_file('Dockerfile')
for cmd in cmds:
    print(cmd.cmd, cmd.value)

Verify before relying

  • Whether the archived repository will continue to receive security updates or bug fixes if Docker's parser changes significantly.
  • Performance characteristics when parsing very large or complex Dockerfiles.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionMedium. Platform-specific wheel
Runtime dependenciesNone
MaintenanceAbandoned 587 days since the last release
Last repo commit repository archived
First released
Downloads358,768 / month, #7,260 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Evidence: dockerfile-3.4.0-cp39-abi3-macosx_13_0_x86_64.whl; dockerfile-3.4.0-cp39-abi3-macosx_14_0_arm64.whl; dockerfile-3.4.0-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl; dockerfile-3.4.0-cp39-abi3-win_amd64.whl

Tags

Capabilities
dockerfile parser pythonparse dockerfile syntaxdocker container definition analysisdockerfile command extractiondockerfile ast representationdocker build file parsingcontainerfile syntax analysis
Topics
dockerfile-parsingdocker-toolingarchived

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “dockerfile parser python”

  • dockerfileParses Dockerfile syntax into structured Python objects using the…
  • dockerfile-parseParses and manipulates Dockerfile files programmatically, allowing…
  • hadolint-coatlProvides a pip-installable hadolint binary wrapper that makes the…

Give your agent the search over MCP, or paste the wish link into any chat.

More Build Tools packages

packaging Worth it
PyPI · Build Tools · released Aug 2026

Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.

Apache-2.0 OR BSD-2-Clausepure Python · 3.9+
2.2Bdownloads / mo
tqdm Worth it
PyPI · Libraries · released Jul 2026

Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
pip Worth it
PyPI · Build Tools · released Aug 2026

pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.

MITpure Python · 3.10+
617.5Mdownloads / mo
hatchling Worth it
PyPI · Python Modules · released Aug 2026

Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.

MITpure Python · 3.10+
484.2Mdownloads / mo
grpcio-tools Worth it
PyPI · Build Tools · released Jul 2026

Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.

Apache-2.0compiled wheel · 3.10+
278.2Mdownloads / mo
pre-commit Worth it
PyPI · Build Tools · released Aug 2026

pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.

Install it if your team needs consistent, automated validation at commit time.

permissive licensepure Python · 3.10+
179.9Mdownloads / mo

See also container-inspector · dockerfile-parse · tox-docker · python-on-whales · ast-serialize · hadolint-coatl · flexparser · bashlex · setuptools-golang · git-url-parse