summaryrefslogtreecommitdiff
path: root/docker
Commit message (Collapse)AuthorAgeFilesLines
* Update changelog for 5.0.3 release5.0.35.0.3-releaseAnca Iordache2021-10-081-1/+1
| | | | Signed-off-by: Anca Iordache <anca.iordache@docker.com>
* Merge pull request #2806 from feliperuhland/fix-low-level-volumes-exampleAnca Iordache2021-10-081-3/+3
|\ | | | | Fix volumes low-level documentation examples
| * Fix volumes low-level documentation examplesFelipe Ruhland2021-04-061-3/+3
| | | | | | | | | | | | | | 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 #2810 from feliperuhland/fix-low-level-swarm-exampleAnca Iordache2021-10-081-5/+5
|\ \ | | | | | | Fix swarm low-level documentation examples
| * | Fix swarm low-level documentation examplesFelipe Ruhland2021-04-071-5/+5
| |/ | | | | | | | | | | | | 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 #2805 from feliperuhland/fix-low-level-network-exampleAnca Iordache2021-10-081-2/+2
|\ \ | | | | | | Fix network low-level documentation examples
| * | Fix network low-level documentation examplesFelipe Ruhland2021-04-061-2/+2
| |/ | | | | | | | | | | | | 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 #2809 from feliperuhland/add-service-capabilityAnca Iordache2021-10-083-2/+25
|\ \ | | | | | | Add service capability
| * | Add `CapabilityAdd` and `CapabilityDrop` toFelipe Ruhland2021-04-072-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ContainerSpec Docker Engine v1.41 added `CapAdd` and `CapDrop` as part of the ContainerSpec, and `docker-py` should do the same. ``` GET /services now returns CapAdd and CapDrop as part of the ContainerSpec. GET /services/{id} now returns CapAdd and CapDrop as part of the ContainerSpec. POST /services/create now accepts CapAdd and CapDrop as part of the ContainerSpec. POST /services/{id}/update now accepts CapAdd and CapDrop as part of the ContainerSpec. GET /tasks now returns CapAdd and CapDrop as part of the ContainerSpec. GET /tasks/{id} now returns CapAdd and CapDrop as part of the ContainerSpec. ``` I added capabilities on docstrings, `service.create` init method and create tests for that. That change was mention in issue #2802. Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
| * | Update API and Engine versionsFelipe Ruhland2021-04-071-1/+1
| |/ | | | | | | | | | | | | The Makefile and `docker/constants.py` were with old versions, so I updated them to the current one Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
* | Merge branch 'master' into feat/add_templating_parameter_docker_configAnca Iordache2021-10-0749-302/+230
|\ \
| * | Fix getting a read timeout for logs/attach with a tty and slow outputSegev Finer2021-09-171-0/+6
| | | | | | | | | | | | | | | | | | Fixes #931 Signed-off-by: Segev Finer <segev208@gmail.com>
| * | Merge pull request #2878 from sina-rostami/masterAnca Iordache2021-09-011-0/+8
| |\ \ | | | | | | | | Improve containers documentation
| | * | Improve containers documentationsinarostami2021-08-161-0/+8
| | | | | | | | | | | | | | | | Signed-off-by: sinarostami <Sinarostami4188.1@gmail.com>
| * | | Merge pull request #2884 from aiordache/changelog_update_5.0.1Anca Iordache2021-09-011-1/+1
| |\ \ \ | | | | | | | | | | Update changelog post-release 5.0.1
| | * | | Update changelog for 5.0.1 releaseAnca Iordache2021-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Anca Iordache <anca.iordache@docker.com>
| * | | | fix(transport): remove disable_buffering optionAdam Aposhian2021-08-311-6/+0
| |/ / / | | | | | | | | | | | | Signed-off-by: Adam Aposhian <aposhian.dev@gmail.com>
| * | | Update changelog for v5.0.0Anca Iordache2021-08-311-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Anca Iordache <anca.iordache@docker.com>
| * | | Merge pull request #2846 from shehzaman/feature/missing-identity-fileAnca Iordache2021-08-311-3/+4
| |\ \ \ | | |/ / | |/| | Put back identityfile parameter from .ssh/config
| | * | Put back identityfile parameterShehzaman2021-08-311-3/+4
| | |/ | | | | | | | | | Signed-off-by: Shehzaman <shehzi.1@gmail.com>
| * | use python3.6+ constructsAnthony Sottile2021-07-0548-289/+209
| | | | | | | | | | | | Signed-off-by: Anthony Sottile <asottile@umich.edu>
| * | [DOCS] Update the Image.save documentation with a working example. Issue #836Roger Camargo2021-06-031-2/+2
| |/ | | | | | | Signed-off-by: Roger Camargo <huogerac@gmail.com>
* | Add the possibility to set a templating driver when creating a new Docker configSebastiano Mariani2021-06-031-2/+7
|/ | | | Signed-off-by: Sebastiano Mariani <smariani@vmware.com>
* Merge pull request #2476 from feliperuhland/add-search-images-limitAnca Iordache2021-04-061-2/+7
|\ | | | | Add limit parameter to image search endpoint
| * Add limit parameter to image search endpointFelipe Ruhland2021-02-241-2/+7
| | | | | | | | 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>
* | | 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 #2788 from docker/set-minimal-python-to-3_6Anca Iordache2021-03-254-44/+34
|\ \ | | | | | | Make python 3.6 the minimum version
| * | Remove support to pre python 3.6set-minimal-python-to-3_6Ulysses Souza2021-03-224-44/+34
| | | | | | | | | | | | Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
* | | Fix `KeyError` when creating a new secretFelipe Ruhland2021-03-241-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-101-1/+1
|/ | | | Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
* Drop LD_LIBRARY_PATH env var for SSH shelloutaiordache2021-02-231-1/+7
| | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* Fix SSH port parsing and add regression testsaiordache2021-02-181-4/+4
| | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* Fix doc formattingVlad Romanenko2021-02-102-2/+2
| | | | Signed-off-by: Vlad Romanenko <vlad.romanenko@hotmail.com>
* Merge pull request #2741 from WojciechowskiPiotr/maxreplicasAnca Iordache2021-02-102-1/+8
|\ | | | | Support for docker.types.Placement.MaxReplicas
| * 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>
* | Fix host trimming and remove quiet flag for the ssh connectionaiordache2021-02-091-13/+20
|/ | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* Post 4.4.1 releaseUlysses Souza2020-12-221-1/+1
| | | | Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
* Prepare release 4.4.14.4.1Ulysses Souza2020-12-221-1/+1
| | | | Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
* Avoid setting unsuported parameter for subprocess.Popen on Windowsaiordache2020-12-181-1/+6
| | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* Merge pull request #2707 from aiordache/after_releaseAnca Iordache2020-12-181-1/+1
|\ | | | | Post-release 4.4.0
| * Post-release v4.4.0aiordache2020-11-231-1/+1
| | | | | | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* | docker/api/image: replace use of deprecated "filter" argumentSebastiaan van Stijn2020-11-261-1/+9
|/ | | | | | | | | | The "filter" argument was deprecated in docker 1.13 (API version 1.25), and removed from API v1.41 and up. See https://github.com/docker/cli/blob/v20.10.0-rc1/docs/deprecated.md#filter-param-for-imagesjson-endpoint This patch applies the name as "reference" filter, instead of "filter" for API 1.25 and up. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Syntax warning fixaiordache2020-11-191-6/+2
| | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* Fix docs typoaiordache2020-11-182-3/+3
| | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* Fix ssh connection - don't override the host and port of the http poolaiordache2020-11-181-53/+58
| | | | Signed-off-by: aiordache <anca.iordache@docker.com>