Two users, one Docker socket
Test permissions as the user that will run the command
Group membership does not apply to an already-running process.
Jenkins runs as its own system user. The permission that matters is the jenkins user's, not yours. Test it the way Jenkins will: If that fails with a socket permission error: The r…