summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add optional parameters for pruning build cache.prune_build_cacheSteve Swor2021-04-062-2/+30
| | | | Signed-off-by: Steve Swor <sworisbreathing@users.noreply.github.com>
* Merge pull request #2476 from feliperuhland/add-search-images-limitAnca Iordache2021-04-062-2/+12
|\ | | | | Add limit parameter to image search endpoint
| * Add limit parameter to image search endpointFelipe Ruhland2021-02-242-2/+12
| | | | | | | | Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
* | Merge pull request #2799 from feliperuhland/fix-low-level-pull-exampleAnca Iordache2021-04-061-4/+4
|\ \ | | | | | | Fix images low-level documentation examples
| * | Fix images low-level documentation examplesFelipe Ruhland2021-04-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I realize that the documentation of low-level `images` was outdated when answering issue #2798 The issue can reproduce it with a simple test: ```py In [1]: import docker In [2]: client = docker.from_env() In [3]: client.pull --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-3-d0931943ca5d> in <module> ----> 1 client.pull ~/docker-py/docker/client.py in __getattr__(self, name) 219 "object APIClient. See the low-level API section of the " 220 "documentation for more details.") --> 221 raise AttributeError(' '.join(s)) 222 223 AttributeError: 'DockerClient' object has no attribute 'pull' In Docker SDK for Python 2.0, this method is now on the object APIClient. See the low-level API section of the documentation for more details. In [4]: client.push --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-4-f7d5b860a184> in <module> ----> 1 client.push ~/docker-py/docker/client.py in __getattr__(self, name) 219 "object APIClient. See the low-level API section of the " 220 "documentation for more details.") --> 221 raise AttributeError(' '.join(s)) 222 223 AttributeError: 'DockerClient' object has no attribute 'push' In Docker SDK for Python 2.0, this method is now on the object APIClient. See the low-level API section of the documentation for more details. In [5]: client.tag --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-5-043bdfd088ca> in <module> ----> 1 client.tag ~/docker-py/docker/client.py in __getattr__(self, name) 219 "object APIClient. See the low-level API section of the " 220 "documentation for more details.") --> 221 raise AttributeError(' '.join(s)) 222 223 AttributeError: 'DockerClient' object has no attribute 'tag' In Docker SDK for Python 2.0, this method is now on the object APIClient. See the low-level API section of the documentation for more details. In [6]: client.get_image --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-6-477c12713276> in <module> ----> 1 client.get_image ~/docker-py/docker/client.py in __getattr__(self, name) 219 "object APIClient. See the low-level API section of the " 220 "documentation for more details.") --> 221 raise AttributeError(' '.join(s)) 222 223 AttributeError: 'DockerClient' object has no attribute 'get_image' In Docker SDK for Python 2.0, this method is now on the object APIClient. See the low-level API section of the documentation for more details. In [7]: client.api.get_image Out[7]: <bound method ImageApiMixin.get_image of <docker.api.client.APIClient object at 0x7fad6a2037c0>> In [8]: client.api.tag Out[8]: <bound method ImageApiMixin.tag of <docker.api.client.APIClient object at 0x7fad6a2037c0>> In [9]: client.api.pull Out[9]: <bound method ImageApiMixin.pull of <docker.api.client.APIClient object at 0x7fad6a2037c0>> In [10]: client.api.push Out[10]: <bound method ImageApiMixin.push of <docker.api.client.APIClient object at 0x7fad6a2037c0>> ``` Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
* | | Merge pull request #2801 from feliperuhland/fix-low-level-containers-exampleAnca Iordache2021-04-061-25/+25
|\ \ \ | |/ / |/| | Fix containers low-level documentation examples
| * | Fix containers low-level documentation examplesFelipe Ruhland2021-04-051-25/+25
|/ / | | | | | | | | | | | | I realize that low-level documentation has outdated examples, so I created issue #2800 to fix that Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
* | Merge pull request #2795 from feliperuhland/upgrade-cryptography-to-3.4.7Ulysses Souza2021-04-032-2/+2
|\ \ | | | | | | Upgrade cryptography library to version 3.4.7
| * | Upgrade cryptography library to version 3.4.7Felipe Ruhland2021-04-022-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dependabot opened a pull request 93bcc0497d8302aa2d78bd7ef756fc2ff3fd0912 to upgrade cryptography from 2.3 to 3.2. However, only `requirements.txt` was updated. The extra requirements were kept outdated. This commit was made to update the library to the last version. Fix #2791 Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
* | Merge pull request #2781 from feliperuhland/fix-readme-badgeUlysses Souza2021-03-291-1/+1
|\ \ | | | | | | Fix continuous integration status badged
| * | Fix continuous integration status badgedFelipe Ruhland2021-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | https://docs.github.com/en/actions/managing-workflow-runs/ adding-a-workflow-status-badge Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
* | | Merge pull request #2788 from docker/set-minimal-python-to-3_6Anca Iordache2021-03-2519-182/+88
|\ \ \ | | | | | | | | Make python 3.6 the minimum version
| * | | Remove support to pre python 3.6set-minimal-python-to-3_6Ulysses Souza2021-03-2219-182/+88
| | | | | | | | | | | | | | | | Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
* | | | Merge pull request #2793 from feliperuhland/create-secret-missing-nameAnca Iordache2021-03-254-0/+23
|\ \ \ \ | |/ / / |/| | | Fix `KeyError` when creating a new secret
| * | | Fix `KeyError` when creating a new secretFelipe Ruhland2021-03-244-0/+23
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | How to reproduce the issue: ```py >>> import docker >>> cli = docker.from_env() >>> cli.secrets.create(name="any_name", data="1") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/docker-py/docker/models/secrets.py", line 10, in __repr__ return "<%s: '%s'>" % (self.__class__.__name__, self.name) File "/home/docker-py/docker/models/secrets.py", line 14, in name return self.attrs['Spec']['Name'] KeyError: 'Spec' ``` The exception raises because create secrets API `/secrets/create` only return the `id` attribute: https://docs.docker.com/engine/api/v1.41/#operation/SecretCreate The secret model is created using just the `id` attribute and fails when looking for Spec.Name attribute. ```py def __repr__(self): return "<%s: '%s'>" % (self.__class__.__name__, self.name) ``` ```py @property def name(self): return self.attrs['Spec']['Name'] ``` I came up with a ugly solution but will prevent the problem to happen again: ```py def create(self, **kwargs): obj = self.client.api.create_secret(**kwargs) + obj.setdefault("Spec", {})["Name"] = kwargs.get("name") return self.prepare_model(obj) ``` After the API call, I added the name attribute to the right place to be used on the property name. ```py >>> import docker >>> cli = docker.from_env() >>> cli.secrets.create(name="any_name", data="1") <Secret: 'any_name'> ``` It isn't the most elegant solution, but it will do the trick. I had a previous PR #2517 when I propose using the `id` attribute instead of `name` on the `__repr__` method, but I think this one will be better. That fixes #2025 Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
* | | Merge pull request #2782 from hakanardo/verify_tlsAnca Iordache2021-03-101-1/+5
|\ \ \ | | | | | | | | Verify TLS keys loaded from docker contexts
| * | | Verify TLS keys loaded from docker contextsHakan Ardo2021-03-031-1/+5
| |/ / | | | | | | | | | | | | | | | This maches the behaviour of the docker cli when using contexts. Signed-off-by: Hakan Ardo <hakan@debian.org>
* | | relax PORT_SPEC regex so it accept and ignore square bracketsNicolas De Loof2021-03-102-1/+7
|/ / | | | | | | Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
* | Merge pull request #2780 from aiordache/changelog_4.4.4Ulysses Souza2021-02-251-0/+8
|\ \ | |/ |/| Update changelog for 4.4.4
| * Update changelog for 4.4.4aiordache2021-02-241-0/+8
|/ | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* Merge pull request #2778 from aiordache/openssl_mismatch_bugAnca Iordache2021-02-241-1/+7
|\ | | | | Drop LD_LIBRARY_PATH env var for SSH shellout
| * Drop LD_LIBRARY_PATH env var for SSH shelloutaiordache2021-02-231-1/+7
| | | | | | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* | Merge pull request #2772 from aiordache/update_changelog_4.4.3Anca Iordache2021-02-241-0/+11
|\ \ | |/ |/| Update changelog post-release 4.4.3
| * Update changelog post-release 4.4.3aiordache2021-02-191-0/+11
|/ | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* Post-release 4.4.2 changelog updatesaiordache2021-02-181-5/+12
| | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* Fix SSH port parsing and add regression testsaiordache2021-02-182-4/+36
| | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* Merge pull request #2711 from vlad-ro/fix-doc-formattingAnca Iordache2021-02-122-2/+2
|\ | | | | Fix doc formatting
| * Fix doc formattingVlad Romanenko2021-02-102-2/+2
| | | | | | | | Signed-off-by: Vlad Romanenko <vlad.romanenko@hotmail.com>
* | Merge pull request #2764 from StefanScherer/clean-home-dockerAnca Iordache2021-02-111-3/+10
|\ \ | | | | | | Use DOCKER_CONFIG to have creds in dind environment
| * | Run unit tests in a container with no .docker/config mountaiordache2021-02-111-1/+8
| | | | | | | | | | | | Signed-off-by: aiordache <anca.iordache@docker.com>
| * | Use DOCKER_CONFIG to have creds in dind environmentStefan Scherer2021-02-111-2/+2
|/ / | | | | | | Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
* | Merge pull request #2763 from StefanScherer/revert-to-wrappedNodeAnca Iordache2021-02-111-3/+3
|\ \ | |/ |/| Revert back to wrappedNode
| * Revert back to wrappedNodeStefan Scherer2021-02-111-3/+3
|/ | | | Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
* Merge pull request #2761 from StefanScherer/no-wrappedNodeAnca Iordache2021-02-101-3/+3
|\ | | | | Remove wrappedNode
| * Remove wrappedNodeStefan Scherer2021-02-101-3/+3
| | | | | | | | Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
* | Merge pull request #2741 from WojciechowskiPiotr/maxreplicasAnca Iordache2021-02-104-1/+23
|\ \ | | | | | | Support for docker.types.Placement.MaxReplicas
| * | Unit and integration tests addedWojciechowskiPiotr2021-02-092-0/+15
| | | | | | | | | | | | Signed-off-by: WojciechowskiPiotr <devel@it-playground.pl>
| * | Support for docker.types.Placement.MaxReplicas (new in API 1.40) in Docker ↵WojciechowskiPiotr2021-02-091-2/+2
| | | | | | | | | | | | | | | | | | Swarm Service Signed-off-by: WojciechowskiPiotr <devel@it-playground.pl>
| * | Support for docker.types.Placement.MaxReplicas (new in API 1.40) in Docker ↵Piotr Wojciechowski2020-12-252-1/+8
| | | | | | | | | | | | | | | | | | Swarm Service Signed-off-by: WojciechowskiPiotr <devel@it-playground.pl>
* | | Bump cffi to 1.14.4aiordache2021-02-101-1/+1
| | | | | | | | | | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* | | Update GH action stepaiordache2021-02-101-3/+3
| |/ |/| | | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* | Merge pull request #2759 from StefanScherer/ubuntu-2004Anca Iordache2021-02-091-3/+3
|\ \ | | | | | | Update CI to ubuntu-2004
| * | Update CI to ubuntu-2004Stefan Scherer2021-02-091-3/+3
|/ / | | | | | | Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
* | GitHub Actions: Upgrade actions/checkoutChristian Clauss2021-02-091-1/+1
| | | | | | | | | | https://github.com/actions/checkout/releases Signed-off-by: Christian Clauss <cclauss@me.com>
* | Merge pull request #2755 from aiordache/fix_ssh_bugAnca Iordache2021-02-091-13/+20
|\ \ | | | | | | Fix host trimming and remove quiet flag for the ssh connection
| * | Fix host trimming and remove quiet flag for the ssh connectionaiordache2021-02-091-13/+20
| | | | | | | | | | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* | | Merge pull request #2739 from cclauss/setup.py-py38-py39Anca Iordache2021-02-091-0/+2
|\ \ \ | | | | | | | | setup.py: Add support for Python 3.8 and 3.9
| * | | setup.py: Add support for Python 3.8 and 3.9Christian Clauss2020-12-241-0/+2
| | |/ | |/| | | | | | | Signed-off-by: Christian Clauss <cclauss@me.com>
* | | Merge pull request #2743 from cclauss/patch-2Anca Iordache2021-02-091-1/+1
|\ \ \ | |_|/ |/| | print() is a function in Python 3
| * | print() is a function in Python 3Christian Clauss2020-12-281-1/+1
| | | | | | | | | | | | | | | | | | Like #2740 but for the docs Signed-off-by: Christian Clauss <cclauss@me.com>