Commit Graph

3199 Commits

Author SHA1 Message Date
Anca Iordache aae6be0c58
Merge branch 'master' into feat/add_templating_parameter_docker_config 2021-10-07 23:29:03 +02:00
Anca Iordache b8258679b3
Merge pull request #2888 from aiordache/changelog_5.0.2
Post-release changelog update
2021-10-07 23:17:38 +02:00
Anca Iordache b27faa62e7
Merge pull request #1959 from segevfiner/logs-read-timeout
Fix getting a read timeout for logs/attach with a tty and slow output
2021-09-17 12:58:19 +02:00
Segev Finer 63618b5e11 Fix getting a read timeout for logs/attach with a tty and slow output
Fixes #931

Signed-off-by: Segev Finer <segev208@gmail.com>
2021-09-17 13:01:14 +03:00
Anca Iordache a9265197d2 Post-release changelog update
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2021-09-01 19:23:59 +02:00
Anca Iordache 264688e37c
Merge pull request #2878 from sina-rostami/master
Improve containers documentation
2021-09-01 18:55:38 +02:00
Anca Iordache d06db4d9e1
Merge pull request #2884 from aiordache/changelog_update_5.0.1
Update changelog post-release 5.0.1
2021-09-01 18:46:28 +02:00
Ulysses Souza dbb28a5af1
Merge pull request #2886 from Aposhian/fix-disable-buffering
fix(transport): remove disable_buffering option
2021-09-01 06:44:48 -07:00
Adam Aposhian f9b85586ca fix(transport): remove disable_buffering option
Signed-off-by: Adam Aposhian <aposhian.dev@gmail.com>
2021-08-31 15:26:09 -06:00
Anca Iordache c5fc193857 Update changelog for 5.0.1 release
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2021-08-31 16:39:50 +02:00
Ulysses Souza 3c3aa69997
Merge pull request #2883 from aiordache/changelog
Update changelog for v5.0.0
2021-08-31 07:11:12 -07:00
Anca Iordache 4a3cddf4bf Update changelog for v5.0.0
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2021-08-31 15:57:32 +02:00
Anca Iordache 62af2bbb13
Merge pull request #2846 from shehzaman/feature/missing-identity-file
Put back identityfile parameter from .ssh/config
2021-08-31 14:42:26 +02:00
Shehzaman 8da03e0126 Put back identityfile parameter
Signed-off-by: Shehzaman <shehzi.1@gmail.com>
2021-08-31 09:23:44 -03:00
Ulysses Souza 5705d12813
Merge pull request #2874 from docker/dependabot/pip/pywin32-301
Bump pywin32 from 227 to 301
2021-08-31 04:53:47 -07:00
sinarostami 2fa56879a2 Improve containers documentation
Signed-off-by: sinarostami <Sinarostami4188.1@gmail.com>
2021-08-16 00:24:12 +04:30
dependabot[bot] e0d186d754
Bump pywin32 from 227 to 301
Bumps [pywin32](https://github.com/mhammond/pywin32) from 227 to 301.
- [Release notes](https://github.com/mhammond/pywin32/releases)
- [Changelog](https://github.com/mhammond/pywin32/blob/master/CHANGES.txt)
- [Commits](https://github.com/mhammond/pywin32/commits)

---
updated-dependencies:
- dependency-name: pywin32
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 20:57:04 +00:00
Ulysses Souza 1abeb46dfa
Merge pull request #2850 from docker/dependabot/pip/urllib3-1.26.5
Bump urllib3 from 1.24.3 to 1.26.5
2021-08-06 05:58:50 -07:00
dependabot[bot] 582f6277ce
Bump urllib3 from 1.24.3 to 1.26.5
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.24.3 to 1.26.5.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.24.3...1.26.5)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-06 12:46:56 +00:00
Ulysses Souza 2cf3900030
Merge pull request #2873 from ulyssessouza/bump-requests
Bump requests => 2.26.0
2021-08-06 05:46:04 -07:00
Ulysses Souza 19d6cd8a01 Bump requests => 2.26.0
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-08-06 09:32:42 -03:00
Ulysses Souza a9748a8b70
Merge pull request #2863 from asottile/py36_plus
use python3.6+ constructs
2021-07-08 11:29:25 -03:00
Anthony Sottile 5fcc293ba2 use python3.6+ constructs
Signed-off-by: Anthony Sottile <asottile@umich.edu>
2021-07-05 18:30:07 -04:00
Mathieu Champlon 650aad3a5f
Merge pull request #2851 from huogerac/issue836_better_docs
Update the Image.save documentation with a working example. Issue #836
2021-06-29 08:53:34 +02:00
Sebastiano Mariani f42a81dca2 Add the possibility to set a templating driver when creating a new Docker config
Signed-off-by: Sebastiano Mariani <smariani@vmware.com>
2021-06-03 15:51:52 -07:00
Roger Camargo d58ca97207 [DOCS] Update the Image.save documentation with a working example. Issue #836
Signed-off-by: Roger Camargo <huogerac@gmail.com>
2021-06-03 09:40:50 -03:00
Anca Iordache 96c12726fd
Merge pull request #2804 from aiordache/update_maintainer
Update maintainers file and setup.py
2021-04-06 17:08:27 +01:00
Anca Iordache 8945fda6be Update maintainers
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2021-04-06 16:01:16 +02:00
Anca Iordache 18fdc23b7c
Merge pull request #2476 from feliperuhland/add-search-images-limit
Add limit parameter to image search endpoint
2021-04-06 14:43:07 +01:00
Anca Iordache 8813c3d2e0
Merge pull request #2799 from feliperuhland/fix-low-level-pull-example
Fix images low-level documentation examples
2021-04-06 14:41:44 +01:00
Anca Iordache 7a2ec95951
Merge pull request #2801 from feliperuhland/fix-low-level-containers-example
Fix containers low-level documentation examples
2021-04-06 14:40:39 +01:00
Felipe Ruhland ac9ae1f249 Fix containers low-level documentation examples
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>
2021-04-05 15:31:43 +02:00
Felipe Ruhland a34dd8b1a9 Fix images low-level documentation examples
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>
2021-04-05 15:01:09 +02:00
Ulysses Souza 0892fcfc12
Merge pull request #2795 from feliperuhland/upgrade-cryptography-to-3.4.7
Upgrade cryptography library to version 3.4.7
2021-04-03 14:48:58 -03:00
Felipe Ruhland 2403774e76 Upgrade cryptography library to version 3.4.7
Dependabot opened a pull request
93bcc0497d 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>
2021-04-02 02:51:20 +02:00
Ulysses Souza a60bd9a454
Merge pull request #2781 from feliperuhland/fix-readme-badge
Fix continuous integration status badged
2021-03-29 22:06:31 +02:00
Anca Iordache 30d482d359
Merge pull request #2788 from docker/set-minimal-python-to-3_6
Make python 3.6 the minimum version
2021-03-25 09:59:41 +01:00
Anca Iordache d2aa221638
Merge pull request #2793 from feliperuhland/create-secret-missing-name
Fix `KeyError` when creating a new secret
2021-03-25 09:58:02 +01:00
Felipe Ruhland d4310b2db0 Fix `KeyError` when creating a new secret
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>
2021-03-24 18:03:54 +01:00
Ulysses Souza c8fba210a2 Remove support to pre python 3.6
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-03-22 10:18:23 -03:00
Anca Iordache 31775a1532
Merge pull request #2782 from hakanardo/verify_tls
Verify TLS keys loaded from docker contexts
2021-03-10 16:17:34 +01:00
Nicolas De Loof 563124163a relax PORT_SPEC regex so it accept and ignore square brackets
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-03-10 11:25:18 +01:00
Hakan Ardo c239d66d5d Verify TLS keys loaded from docker contexts
This maches the behaviour of the docker cli when using contexts.

Signed-off-by: Hakan Ardo <hakan@debian.org>
2021-03-03 09:30:19 +01:00
Felipe Ruhland d836bb8703 Fix continuous integration status badged
https://docs.github.com/en/actions/managing-workflow-runs/
adding-a-workflow-status-badge

Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
2021-02-26 22:02:55 +01:00
Ulysses Souza 55f405e04a
Merge pull request #2780 from aiordache/changelog_4.4.4
Update changelog for 4.4.4
2021-02-25 10:30:18 -03:00
Felipe Ruhland 7d316641a3 Add limit parameter to image search endpoint
Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
2021-02-24 23:42:20 +01:00
aiordache 148f9161e1 Update changelog for 4.4.4
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-02-24 18:20:24 +01:00
Anca Iordache d09fe8d225
Merge pull request #2778 from aiordache/openssl_mismatch_bug
Drop LD_LIBRARY_PATH env var for SSH shellout
2021-02-24 16:39:55 +01:00
Anca Iordache 69087ab977
Merge pull request #2772 from aiordache/update_changelog_4.4.3
Update changelog post-release 4.4.3
2021-02-24 14:32:02 +01:00
aiordache 43ca2f8ff9 Drop LD_LIBRARY_PATH env var for SSH shellout
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-02-23 19:04:03 +01:00