$npx skillfedfor your agent

dockerfile-parse

Python library for Dockerfile manipulation

With conditionsPyPI Python ModulesReleased Jul 202311.6M downloads / moBSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — dockerfile_parse-2.0.1-py2.py3-none-any.whl
v2.0.1 · released 2023-07-18 · Python >=3.6

Yes, if you need to parse or modify Dockerfiles in Python code. Low install friction, no dependencies, and stable API make it a straightforward choice for build tooling. Dormant maintenance is acceptable for a mature, narrow-scope library, but verify that its parser handles your target Dockerfile syntax before committing to it in a critical pipeline.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with no runtime dependencies.
  • Maintenance is dormant—last release was 2023-07-18 and no commits since 2024-08-12—but the package is marked Production/Stable and has been in use since 2015, so it is unlikely to require active development.

License · maintenance · safety

BSD (permissive) — BSD license is permissive, allowing commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice.

last release 2023-07-18 (1123 days) · last repo commit 2024-08-12 · 142 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 11,634,782 downloads/mo, #1,375 on PyPI

Verify before relying

pip install dockerfile-parse

from dockerfile_parse import DockerfileParser

dfp = DockerfileParser()
dfp.content = "FROM base\nLABEL foo=\"bar\"\nUSER me"
print(dfp.baseimage)
dfp.baseimage = 'centos:7'
print(dfp.content)
  • Whether the parser handles all Dockerfile syntax variations and edge cases introduced in recent Docker versions
  • Whether dormant maintenance poses a risk if Docker's Dockerfile format evolves significantly
Same gist for agents: .md · .json

What it is and what it does

dockerfile-parse is a Python library that reads and parses Dockerfile files into a structured representation, exposing properties like base image, labels, and user directives for programmatic inspection and modification. It has no runtime dependencies and supports Python 3.6 through 3.11, making it lightweight to integrate into build tooling, container orchestration systems, or CI/CD pipelines that need to reason about or rewrite Dockerfiles.

The library is in Production/Stable status and has been maintained since 2015, though recent activity is minimal. It is suitable for tasks like extracting metadata from Dockerfiles, validating structure, or generating modified versions with updated base images or labels. The permissive BSD license allows use in both open and closed projects.

Use it for

  • Extract base image, labels, and user directives from existing Dockerfiles for inventory or compliance auditing
  • Programmatically update a Dockerfile's base image across a fleet of build configurations
  • Validate Dockerfile structure and syntax before passing it to a build system
  • Generate or transform Dockerfiles in build automation tools that need to inject environment variables or change layers

Worth the install?

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

With conditions

Yes, if you need to parse or modify Dockerfiles in Python code.

Low install friction, no dependencies, and stable API make it a straightforward choice for build tooling. Dormant maintenance is acceptable for a mature, narrow-scope library, but verify that its parser handles your target Dockerfile syntax before committing to it in a critical pipeline.

Install

dockerfile-parse on PyPI

Before you install

Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2023-07-18 and no commits since 2024-08-12—but the package is marked Production/Stable and has been in use since 2015, so it is unlikely to require active development.

License in practice

BSD license is permissive, allowing commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice.

Quickstart

pip install dockerfile-parse

from dockerfile_parse import DockerfileParser

dfp = DockerfileParser()
dfp.content = "FROM base\nLABEL foo=\"bar\"\nUSER me"
print(dfp.baseimage)
dfp.baseimage = 'centos:7'
print(dfp.content)

Verify before relying

  • Whether the parser handles all Dockerfile syntax variations and edge cases introduced in recent Docker versions
  • Whether dormant maintenance poses a risk if Docker's Dockerfile format evolves significantly

Package facts

LicenseBSD permissive
Python supportSupports the current Python release >=3.6
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceDormant 1,123 days since the last release
Last repo commit
First released
Downloads11,634,782 / month, #1,375 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Other EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Libraries :: Python Modules

Evidence: dockerfile_parse-2.0.1-py2.py3-none-any.whl

Tags

Capabilities
dockerfile parsingparse dockerfile pythondockerfile manipulationread dockerfile structuredockerfile analysis librarymodify dockerfile contentdockerfile ast parser
Topics
dockerfilecontainer-buildparsing

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 parsing”

  • dockerfile-parseParses and manipulates Dockerfile files programmatically, allowing…
  • dockerfileParses Dockerfile syntax into structured Python objects using the…
  • container-inspectorAnalyzes Docker images, containers, and virtual machine images to…

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

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also dockerfile · INITools · plyara · rosdistro · tox-docker · hadolint-coatl · parver · aspy.refactor-imports · dom-toml · omegaconf