summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ci: empty commit to trigger readthedocsHEADmainMilas Bowman2023-05-110-0/+0
| | | | | | Fixing integration Signed-off-by: Milas Bowman <milas.bowman@docker.com>
* docs: update changelog (#3127)6.1.2Milas Bowman2023-05-111-0/+41
| | | Signed-off-by: Milas Bowman <milas.bowman@docker.com>
* api: avoid socket timeouts when executing commands (#3125)loicleyendecker2023-05-111-1/+1
| | | | | | | Only listen to read events when polling a socket in order to avoid incorrectly trying to read from a socket that is not actually ready. Signed-off-by: Loïc Leyendecker <loic.leyendecker@gmail.com>
* api: respect timeouts on Windows named pipes (#3112)Imogen2023-05-081-19/+36
| | | Signed-off-by: Imogen <59090860+ImogenBits@users.noreply.github.com>
* Fix container.stats infinite blocking on stream mode (#3120)6.1.1RazCrimson2023-05-072-2/+14
| | | | | | | fix: api - container.stats infinite blocking on stream mode Includes additional test for no streaming Signed-off-by: Bharath Vignesh J K <52282402+RazCrimson@users.noreply.github.com>
* api: update return type of `diff` method (#3115)John Yang2023-05-052-2/+4
| | | Signed-off-by: John Yang <john.yang20@berkeley.edu>
* deps: compatiblity with requests ≥ 2.29.0 and urllib3 2.x (#3116)6.1.0Felix Fontein2023-05-056-35/+12
| | | | | | Requirements are the same, so it's still possible to use `urllib3 < 2` or `requests == 2.28.2` for example. Signed-off-by: Felix Fontein <felix@fontein.de>
* socket: use poll() instead of select() except on Windows (#2865)I-question-this2023-04-211-1/+8
| | | | | | | | Fixes #2278, which was originally addressed in #2279, but was not properly merged. Additionally it did not address the problem of poll not existing on Windows. This patch falls back on the more limited select method if host system is Windows. Signed-off-by: Tyler Westland <tylerofthewest@gmail.com>
* api: note the data arg may also be a stream in `put_archive` (#2478)Aarni Koskela2023-02-222-2/+2
| | | Signed-off-by: Aarni Koskela <akx@iki.fi>
* socket: fix for errors on pipe close in Windows (#3099)Milas Bowman2023-02-221-1/+1
| | | | | | | | | Need to return data, not size. By returning an empty string, EOF will be detected properly since `len()` will be `0`. Fixes #3098. Signed-off-by: Milas Bowman <milas.bowman@docker.com>
* api: add `status` parameter to services list (#3093)Lorin Bucher2023-02-163-1/+25
| | | Signed-off-by: Lorin Bucher <lorin@lbtec.dev>
* api: add `one-shot` option to container `stats` (#3089)Andy Roxby2023-02-162-5/+32
| | | Signed-off-by: Andy Roxby <107427605+aroxby-wayscript@users.noreply.github.com>
* Merge branch 'master'Milas Bowman2023-01-272-2/+98
|\ | | | | | | (Old PR unintentionally went to the `master` branch.)
| * client: add `network_driver_opt` to container run and create (#3083)Mariano Scazzariello2023-01-272-2/+98
| | | | | | Signed-off-by: Mariano Scazzariello <marianoscazzariello@gmail.com>
* | exec: fix file handle leak with container.exec_* APIs (#2320)Peter Wu2023-01-132-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requests with stream=True MUST be closed or else the connection will never be returned to the connection pool. Both ContainerApiMixin.attach and ExecApiMixin.exec_start were leaking in the stream=False case. exec_start was modified to follow attach for the stream=True case as that allows the caller to close the stream when done (untested). Tested with: # Test exec_run (stream=False) - observe one less leak make integration-test-py3 file=models_containers_test.py' -k test_exec_run_success -vs -W error::ResourceWarning' # Test exec_start (stream=True, fully reads from CancellableStream) make integration-test-py3 file=api_exec_test.py' -k test_execute_command -vs -W error::ResourceWarning' After this change, one resource leak is removed, the remaining resource leaks occur because none of the tests call client.close(). Fixes https://github.com/docker/docker-py/issues/1293 (Regression from https://github.com/docker/docker-py/pull/1130) Signed-off-by: Peter Wu <pwu@cloudflare.com> Co-authored-by: Milas Bowman <milas.bowman@docker.com>
* | fix(store): warn on init instead of throw (#3080)Yanlong Wang2023-01-102-1/+15
| | | | | | Signed-off-by: yanlong.wang <yanlong.wang@naiver.org>
* | build(deps): Bump setuptools from 63.2.0 to 65.5.1 (#3082)dependabot[bot]2023-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [setuptools](https://github.com/pypa/setuptools) from 63.2.0 to 65.5.1. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst) - [Commits](https://github.com/pypa/setuptools/compare/v63.2.0...v65.5.1) --- updated-dependencies: - dependency-name: setuptools dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* | docs: fix wrong command syntax in code annotation (#3081)Maxim Mironyuk2023-01-101-1/+1
| | | | | | Signed-off-by: Maxim Mironyuk <serieznyi@gmail.com>
* | volume: do not strip trailing characters from names (#3073)loicleyendecker2022-12-022-4/+6
| | | | | | | | | | | | Only remove `:ro` or `:rw` suffixes in their entirety; do not strip arbitrary `r` / `o` / `w` / `:` characters individually. Signed-off-by: Loïc Leyendecker <loic.leyendecker@gmail.com>
* | ci: add support for Python 3.11 (#3064)Hugo van Kemenade2022-11-154-3/+4
| | | | | | Signed-off-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* | socket: handle npipe close on Windows (#3056)6.0.1Nick Santos2022-11-021-0/+14
| | | | | | | | | | Fixes https://github.com/docker/docker-py/issues/3045 Signed-off-by: Nick Santos <nick.santos@docker.com>
* | test: use anonymous volume for prune (#3051)Brian Goff2022-10-051-4/+3
| | | | | | | | | | | | | | This is related to https://github.com/moby/moby/pull/44216 Prunes will, by default, no longer prune named volumes, only anonymous ones. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* | api: add support for floats to docker logs params since / until (#3031)Rhiza2022-08-193-11/+33
| | | | | | | | | | | | | | | | Add support for floats to docker logs params `since` / `until` since the Docker Engine APIs support it. This allows using fractional seconds for greater precision. Signed-off-by: Archi Moebius <poerhiz@gmail.com>
* | ci: use latest stable syntax for Dockerfiles (#3035)Sebastiaan van Stijn2022-08-195-5/+15
|/ | | | | | | | | | | | I noticed one Dockerfile was pinned to 1.4; given that there's a backward compatibility guarantee on the stable syntax, the general recommendation is to use `dockerfile:1`, which makes sure that the latest stable release of the Dockerfile syntax is pulled before building. While changing, I also made some minor changes to some Dockerfiles to reduce some unneeded layers. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* docs: install package in ReadTheDocs build (#3032)Milas Bowman2022-08-181-4/+7
| | | | | | Need to install ourselves so that we can introspect on version using `setuptools_scm` in `docs/conf.py`. Signed-off-by: Milas Bowman <milas.bowman@docker.com>
* test: add additional tests for cgroupns option (#3024)6.0.0Milas Bowman2022-08-122-0/+33
| | | | | See #2930. Signed-off-by: Milas Bowman <milas.bowman@docker.com>
* swarm: add support for DataPathPort on init (#2987)Chris Hand2022-08-123-2/+23
| | | | | | Adds support for setting the UDP port used for VXLAN traffic between swarm nodes Signed-off-by: Chris Hand <dexteradeus@users.noreply.github.com>
* Merge remote-tracking branch 'upstream/main' into patch-1Milas Bowman2022-08-12144-1488/+4336
|\
| * Merge remote-tracking branch 'upstream/main' into connect-with-macMilas Bowman2022-08-12144-1482/+4301
| |\
| | * swarm: add sysctl support for services (#3029)Quentin Mathorel2022-08-124-3/+35
| | | | | | | | | Signed-off-by: Quentin Mathorel <quentin.mathorel@outlook.fr>
| | * docs: add changelog for 6.0.0 (#3019)6.0.0b2Milas Bowman2022-08-112-2/+40
| | | | | | | | | Signed-off-by: Milas Bowman <milas.bowman@docker.com>
| | * Support `global-job` and `replicated-job` modes in Docker Swarm (#3016)Leonard Kinday2022-08-115-25/+119
| | | | | | | | | | | | | | | | | | | | | Add `global-job` and `replicated-job` modes Fixes #2829. Signed-off-by: Leonard Kinday <leonard@kinday.ru>
| | * credentials: eliminate distutils deprecation warnings (#3028)Ningú2022-08-023-33/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While removing any usage of the deprecated `distutils` package, ("The distutils package is deprecated and slated for removal in Python 3.12.") this internal utility can be removed straightaway because the `shutil.which` replacement for `distutils.spawn.find_executable` already honors the `PATHEXT` environment variable in windows systems. See https://docs.python.org/3/library/shutil.html#shutil.which Signed-off-by: Daniel Möller <n1ngu@riseup.net>
| | * lint: remove extraneous logic for `preexec_func` (#2920)q0w2022-08-021-1/+1
| | | | | | | | | | | | | | | `preexec_func` is still None if it is win32 Signed-off-by: q0w <43147888+q0w@users.noreply.github.com>
| | * docs: add `gzip` arg to `BuildApiMixin` (#2929)Saurav Maheshkar2022-08-021-0/+1
| | | | | | | | | Signed-off-by: Saurav Maheshkar <sauravvmaheshkar@gmail.com>
| | * docs: remove duplicate 'on' in comment (#2370)Thomas Gassmann2022-07-301-1/+1
| | | | | | | | | | | | | | | Remove duplicate 'on' in comment Signed-off-by: Thomas Gassmann <thomas.gassmann@hotmail.com>
| | * ci: add missing wheel package6.0.0b1Milas Bowman2022-07-301-1/+4
| | | | | | | | | Signed-off-by: Milas Bowman <milas.bowman@docker.com>
| | * ci: fix quoting in YAMLMilas Bowman2022-07-301-2/+2
| | | | | | | | | | | | | | | Because apparently `!` is special Signed-off-by: Milas Bowman <milas.bowman@docker.com>
| | * ci: add workflow for releases (#3018)Milas Bowman2022-07-3012-22/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GitHub Actions workflow to create a release: will upload to PyPI and create a GitHub release with the `sdist` and `bdist_wheel` as well. The version code is switched to `setuptools_scm` to work well with this flow (e.g. avoid needing to write a script that does a `sed` on the version file and commits as part of release). Signed-off-by: Milas Bowman <milas.bowman@docker.com>
| | * docs: fix RollbackConfig/Order values (#3027)Milas Bowman2022-07-301-2/+2
| | | | | | | | | | | | | | | Closes #2626. Signed-off-by: Milas Bowman <milas.bowman@docker.com>
| | * docs: image build clarifications/grammar (#2489)Max Fan2022-07-291-5/+5
| | | | | | | | | | | | | | | I changed was build > was built and reorganized a few sentences to be more clear. Signed-off-by: InnovativeInventor <theinnovativeinventor@gmail.com>
| | * docs: fix image save example (#2570)Hristo Georgiev2022-07-290-0/+0
| | | | | | | | | Signed-off-by: Hristo Georgiev <hristo.a.georgiev@gmail.com>
| | * Merge branch 'docs-healthcheck'Milas Bowman2022-07-291-1/+22
| | |\ | | | | | | | | | | | | Manually merging #2595 to include a tiny fix.
| | | * docs: fix list formattingMilas Bowman2022-07-291-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: Milas Bowman <milas.bowman@docker.com>
| | | * Merge remote-tracking branch 'upstream/main' into HEADMilas Bowman2022-07-29135-1418/+3303
| | | |\ | | | |/ | | |/|
| | * | docs: clarify TLSConfig verify parameter (#2573)Ville Skyttä2022-07-291-2/+3
| | | | | | | | | | | | Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
| | * | docs: fix TLS server verify example (#2574)Ville Skyttä2022-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | Leaving out the verify parameter means verification will not be done. Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
| | * | build: trim trailing whitespace from dockerignore entries (#2733)Clément Loiselet2022-07-292-0/+12
| | | | | | | | | | | | | | | | | | | | fix(dockerignore): trim trailing whitespace Signed-off-by: Clément Loiselet <clement.loiselet@capgemini.com>
| | * | model: add remove() to Image (#3026)Milas Bowman2022-07-292-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow an Image to be deleted by calling the remove() method on it, just like a Volume. Signed-off-by: Ahmon Dancy <dancy@dancysoft.com> Signed-off-by: Milas Bowman <milas.bowman@docker.com> Co-authored-by: Ahmon Dancy <dancy@dancysoft.com>
| | * | api: add rollback_config to service create (#2917)ercildoune2022-07-293-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `rollback_config` was not in the list of `CREATE_SERVICE_KWARGS` which prevented it from being an argument when creating services. It has now been added and the problem fixed, allowing services to have a rollback_config during creation and updating. Fixes #2832. Signed-off-by: Fraser Patten <pattenf00@gmail.com> Signed-off-by: Milas Bowman <milas.bowman@docker.com> Co-authored-by: Milas Bowman <milas.bowman@docker.com>