Skip to content

feat: add support for images/prune API#1001

Merged
bdraco merged 5 commits intoaio-libs:mainfrom
mdegat01:add-images-prune
Feb 13, 2026
Merged

feat: add support for images/prune API#1001
bdraco merged 5 commits intoaio-libs:mainfrom
mdegat01:add-images-prune

Conversation

@mdegat01
Copy link
Copy Markdown
Contributor

@mdegat01 mdegat01 commented Feb 2, 2026

What do these changes do?

Add support for the images/prune API to the library as detailed here: https://docs.docker.com/reference/api/engine/version/v1.53/#tag/Image/operation/ImagePrune

Are there changes in behavior for the user?

New method for a new API, no changes to existing functionality.

Related issue number

Not exactly. #691 is kind of related and was also on my list to make a PR for after images though, assume this one was accepted.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the changes folder
    • name it <issue_id>.<type> for example (588.bug)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.12%. Comparing base (af96776) to head (e683fbc).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1001      +/-   ##
==========================================
+ Coverage   73.03%   73.12%   +0.08%     
==========================================
  Files          25       25              
  Lines        1836     1842       +6     
  Branches      250      251       +1     
==========================================
+ Hits         1341     1347       +6     
  Misses        410      410              
  Partials       85       85              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bdraco bdraco requested a review from Copilot February 2, 2026 19:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for the Docker images/prune API endpoint, enabling programmatic deletion of unused images with optional filtering capabilities.

Changes:

  • Implements a new prune method in the DockerImages class with support for filtering by dangling status, timestamp, and labels
  • Adds comprehensive test coverage for the new prune functionality with and without filters
  • Updates documentation with contributor attribution and changelog entries

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
aiodocker/images.py Implements the prune method with filter support and documentation
tests/test_images.py Adds two test cases covering prune with filters and without filters
CONTRIBUTORS.txt Adds Mike Degatano to contributors list
CHANGES/1001.feature.md Adds changelog entry for the new feature
CHANGES/1001.feature Duplicate changelog entry (same content as .md file)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bdraco
Copy link
Copy Markdown
Member

bdraco commented Feb 2, 2026

Looks like actions is broken https://www.githubstatus.com/

Copy link
Copy Markdown
Member

@bdraco bdraco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mdegat01

@bdraco bdraco merged commit ef0c18c into aio-libs:main Feb 13, 2026
19 checks passed
@bdraco bdraco mentioned this pull request Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants