You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
TODO: add a dev note regarding sudoless docker #749
Devs should be informed (using the official docs) that the testing environment considers sudoless docker as a baseline (and some things might not work / break if sudo is required)
For a future plan, we should rewrite / avoid using docker command directly (for example using subprocess.run) and use the docker SDK.
what did you do that didnt work? for example, i just pulled latest main, ran tests with make tests, expected that to work and it did. Well, I'm still waiting - currently it is running aws, core/arango succeeded.
ah okay so "sudoless" refers not to rootless docker or anything but rather it refers to the permissions on the docker socket.
I consider it invalid docker installation if you do not also do
sudo usermod -aG docker $USER
after installing.
I wonder what the difference is between using DockerClient() - as I've instructed people to do the usermod and that has unblocked people using testcontainers in general before on linux (via slack).
Note that its not the user that affect the behavior but the complimentary requirement export DOCKER_HOST=unix:///run/user/1000/docker.socksource
This can be avoided as the DockerClient fetch the DOCKER_HOST and make our life easier without the need to rely on/in case docker is running with/without sudo :)
Activity
Tranquility2 commentedon Dec 14, 2024
This is the general gist
Tranquility2 commentedon Dec 14, 2024
@alexanderankin @totallyzen please tell me how you think is best to proceed and I'll open a PR accordingly.
alexanderankin commentedon Dec 15, 2024
what did you do that didnt work? for example, i just pulled latest main, ran tests with
make tests, expected that to work and it did. Well, I'm still waiting - currently it is running aws, core/arango succeeded.Tranquility2 commentedon Dec 15, 2024
Checkout the comments on https://github.com/testcontainers/testcontainers-python/pull/714/files#r1885389659
TLDR: the dind tests fails as they run "docker build" without sudo using
subprocess.Tranquility2 commentedon Dec 15, 2024
I assume you prefer not to add this comment so I'll start working on replacing the relevant code.
Tranquility2 commentedon Dec 15, 2024
Created https://github.com/testcontainers/testcontainers-python/pull/750/files
alexanderankin commentedon Dec 15, 2024
ah okay so "sudoless" refers not to rootless docker or anything but rather it refers to the permissions on the docker socket.
I consider it invalid docker installation if you do not also do
after installing.
I wonder what the difference is between using
DockerClient()- as I've instructed people to do the usermod and that has unblocked people using testcontainers in general before on linux (via slack).Tranquility2 commentedon Dec 15, 2024
Note that its not the user that affect the behavior but the complimentary requirement
export DOCKER_HOST=unix:///run/user/1000/docker.socksourceThis can be avoided as the
DockerClientfetch theDOCKER_HOSTand make our life easier without the need to rely on/in case docker is running with/without sudo :)fix(tests): replace dind-test direct docker usage with sdk (#750)