docker / docker/docker-py

Feature Request: some API should support image list as args

Open
#1,149 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

group/api-upgrade kind/feature-request
Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

For example, you can use

docker save -o images.tar.gz docker.example.com/images/{image1,image2}:latest

to save multi docker at one time ( docker source code )

However, docker-py do not support multi images as API args.

I write one by my self,

class ImageApiMixin(object):
    ......
    def get_image(self, images):
        images_query = "?names=" + "&names=".join(images)
        res = self._get(self._url("/images/get" + images_query), stream=True)
        self._raise_for_status(res)
        return res.raw

so I can use

client.get_images([image1, image2])

to save multi images to one file.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ImageApiMixin.get_image example and the client.get_images([image1, image2]) usage described in the issue. Trace how image retrieval arguments are currently passed, then make multi-image input work through the API and verify that multiple images can be saved to one file.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.