Revert "Fix copyUIDGID parameter inversion in Docker compat API"

This reverts commit 2b848cca36.

The official Docker API documentation was misleading here.
Testing shown that old podman behaviour was correct.
In docker copyUIDGID=true means that primary container uid/gid is used,
not the uid/gid from the tar stream.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
This commit is contained in:
Matej Vašek committed 2025-11-14 12:39:04 +01:00
1 parent d3c5c5d219
commit 65411d53c9
3 files changed
+4 -51

No files matched your search

+1 -2
View File
@@ -191,8 +191,7 @@ class TestContainers(common.DockerTestCase):
ret, out = ctr.exec_run(["stat", "-c", "%u:%g", "/tmp/a.txt"])
self.assertEqual(ret, 0)
# Docker-py implementation of put_archive dont do request with copyUIDGID=true
self.assertEqual(out.rstrip(), b"0:0", "UID/GID of copied file")
self.assertEqual(out.rstrip(), b"1042:1043", "UID/GID of copied file")
ret, out = ctr.exec_run(["cat", "/tmp/a.txt"])
self.assertEqual(ret, 0)