docker / docker/docker-py

Documentation for "images" is incorrect?

Open
#2,438 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

This page says that it documents the methods on client.images, but client has no images attribute.

$  python
Python 3.6.4 (default, Aug 22 2019, 12:24:29) 
[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import docker
>>> docker.client.images
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'docker.client' has no attribute 'images'
>>> docker.__version__
'1.10.6'

I also thought perhaps the documentation meant "...methods on Client.images" (the class instead of the module?), and while Client.images does indeed exist, it's apparently a method for listing the images, not an object with methods for building, tagging, pushing, etc as the docs portray it.

I'm not sure if I'm doing something wrong or if the docs are just outdated?

Also, the docs talk about a DockerClient class (https://docker-py.readthedocs.io/en/latest/client.html#client-reference) and they even give an example

import docker
client = docker.DockerClient(base_url='unix://var/run/docker.sock')

But this errors for me: *** AttributeError: module 'docker' has no attribute 'DockerClient'

Also, I did a pip --force-reinstall docker-py to be sure I was running the right version.

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 by comparing the linked images and client documentation with the reported docker-py 1.10.6 behavior and the Python reproduction. Verify whether the pages describe a different API version, then update the documentation so the documented client attributes and DockerClient example match the supported interface.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.