Commit Graph

3223 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 7168e09b16
test: fix for cgroupv2 (#2940)
This test was verifying that the container has the right options set (through
`docker inspect`), but also checks if the cgroup-rules are set within the
container by reading `/sys/fs/cgroup/devices/devices.list`

Unlike cgroups v1, on cgroups v2, there is no file interface, and rules are
handled through ebpf, which means that the test will fail because this file
is not present.

From the Linux documentation for cgroups v2:
https://github.com/torvalds/linux/blob/v5.16/Documentation/admin-guide/cgroup-v2.rst#device-controller

> (...)
> Device controller manages access to device files. It includes both creation of
> new device files (using mknod), and access to the existing device files.
>
> Cgroup v2 device controller has no interface files and is implemented on top
> of cgroup BPF. To control access to device files, a user may create bpf programs
> of type BPF_PROG_TYPE_CGROUP_DEVICE and attach them to cgroups with
> BPF_CGROUP_DEVICE flag. (...)

Given that setting the right cgroups is not really a responsibility of this SDK,
it should be sufficient to verify that the right options were set in the container
configuration, so this patch is removing the part that checks the cgroup, to
allow this test to be run on a host with cgroups v2 enabled.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-26 12:06:51 -04:00
Milas Bowman f16c4e1147
utils: fix IPv6 address w/ port parsing (#3006)
This was using a deprecated function (`urllib.splitnport`),
ostensibly to work around issues with brackets on IPv6 addresses.

Ironically, its usage was broken, and would result in mangled IPv6
addresses if they had a port specified in some instances.

Usage of the deprecated function has been eliminated and extra test
cases added where missing. All existing cases pass as-is. (The only
other change to the test was to improve assertion messages.)

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-07-26 11:35:44 -04:00
Milas Bowman 2933af2ca7
ci: remove Python 3.6 and add 3.11 pre-releases (#3005)
* Python 3.6 went EOL Dec 2021
* Python 3.11 is in beta and due for GA release in October 2022

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-07-26 08:51:52 -04:00
Milas Bowman a6db044bd4
deps: upgrade pywin32 & relax version constraint (#3004)
Upgrade to latest pywin32, which has support for Python 3.10 and
resolves a CVE (related to ACL APIs, outside the scope of what
`docker-py` relies on, which is npipe support, but still gets
flagged by scanners).

The version constraint has also been relaxed in `setup.py` to allow
newer versions of pywin32. This is similar to how we handle the
other packages there, and should be safe from a compatibility
perspective.

Fixes #2902.
Closes #2972 and closes #2980.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-07-26 08:43:45 -04:00
Laura Brehm e131955685
Merge pull request #2974 from docker/dependabot/pip/paramiko-2.10.1
Bump paramiko from 2.8.0 to 2.10.1
2022-07-13 12:50:12 +02:00
dependabot[bot] e0a3abfc37
Bump paramiko from 2.8.0 to 2.10.1
Bumps [paramiko](https://github.com/paramiko/paramiko) from 2.8.0 to 2.10.1.
- [Release notes](https://github.com/paramiko/paramiko/releases)
- [Changelog](https://github.com/paramiko/paramiko/blob/main/NEWS)
- [Commits](https://github.com/paramiko/paramiko/compare/2.8.0...2.10.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-29 21:55:39 +00:00
Stefan Scherer a48a5a9647
Merge pull request #2898 from hugovk/add-3.10
Add support for Python 3.10
2021-10-14 19:25:22 +02:00
Stefan Scherer ac5f6ef93a
Merge pull request #2897 from aiordache/changelog_5.0.3
Update changelog for 5.0.3
2021-10-14 10:46:17 +02:00
Hugo van Kemenade 4bb99311e2 Don't install mock backport
Signed-off-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2021-10-11 23:06:12 +03:00
Hugo van Kemenade bbbc29191a Bump minimum paramiko to support Python 3.10
Signed-off-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2021-10-11 23:06:12 +03:00
Hugo van Kemenade 72bcd1616d Bump pytest (and other dependencies) for Python 3.10
Signed-off-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2021-10-11 23:06:12 +03:00
Hugo van Kemenade 4150fc4d9d Universal wheels are for code expected to work on both Python 2 and 3
Signed-off-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2021-10-11 23:06:12 +03:00
Hugo van Kemenade a9de343210 Add support for Python 3.10
Signed-off-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2021-10-11 23:06:12 +03:00
Anca Iordache ecace769f5 Post-release changelog update
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2021-10-08 00:58:26 +02:00
Anca Iordache 7172269b06
Merge pull request #2806 from feliperuhland/fix-low-level-volumes-example
Fix volumes low-level documentation examples
2021-10-08 00:05:55 +02:00
Anca Iordache fcb35f4197
Merge pull request #2810 from feliperuhland/fix-low-level-swarm-example
Fix swarm low-level documentation examples
2021-10-08 00:04:02 +02:00
Anca Iordache 3c5f0d0ee1
Merge pull request #2805 from feliperuhland/fix-low-level-network-example
Fix network low-level documentation examples
2021-10-08 00:03:11 +02:00
Anca Iordache 7779b84e87
Merge pull request #2809 from feliperuhland/add-service-capability
Add service capability
2021-10-08 00:01:28 +02:00
Anca Iordache df59f538c2
Merge pull request #2852 from Phat3/feat/add_templating_parameter_docker_config
Add the possibility to set a templating driver when creating a new Docker config
2021-10-07 23:59:08 +02:00
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
Felipe Ruhland 13c316de69 Fix swarm 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-07 22:55:23 +02:00
Felipe Ruhland 7ac8b56730 Add `CapabilityAdd` and `CapabilityDrop` to
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>
2021-04-07 22:11:52 +02:00
Felipe Ruhland f53e615e0f Update API and Engine versions
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>
2021-04-07 21:44:24 +02:00
Felipe Ruhland 50a0ff596f Fix network 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-06 20:52:49 +02:00
Felipe Ruhland 4b44fa7e5d Fix volumes 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-06 20:32:05 +02:00