fix: remove hardcoded sudo docker and respect DOCKEREXE override in mkconcore.py (fixes #343)#421
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #343 by removing hardcoded "sudo docker" commands from mkconcore.py and replacing them with the DOCKEREXE variable throughout the codebase. The default Docker executable changes from "sudo docker" to "docker", making concore work out-of-the-box with Docker Desktop (macOS/Windows), rootless Docker, and Podman.
Changes:
- Changed default
DOCKEREXEfrom"sudo docker"to"docker"with environment variable override support - Replaced 18 hardcoded "sudo docker" strings in generated
maxtime,params, andunlockscripts with dynamicDOCKEREXEvariable references - Maintained backward compatibility via existing
concore.sudoconfig file override and newDOCKEREXEenvironment variable
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @GaneshPatil7517 |
Hi @Rahuljagwani Sir, thank you for the review
I'll push the README update to this same branch shortly. |
|
Yes, pls add the README.md update to this same PR and tag me. @GaneshPatil7517 |
Sure @pradeeban sir give me some time.... |
Hello @pradeeban Sir
This PR resolves #343 by removing all hardcoded
"sudo docker"frommkconcore.pyand ensuring theDOCKEREXEvariable is used consistently.Problem
DOCKEREXEdefaulted to"sudo docker", failing on Docker Desktop (macOS/Windows), rootless Docker, and Podmanmaxtime,params, andunlockscripts hardcoded"sudo docker"instead of usingDOCKEREXEChanges (19 lines, single file)
DOCKEREXE = os.environ.get("DOCKEREXE", "docker")— defaults to"docker", overridable via env var"sudo docker"inmaxtime,params, andunlockscript generation replaced withf'{DOCKEREXE} ...'Backward Compatibility
concore.sudoconfig still overridesDOCKEREXE(unchanged logic at line ~180)DOCKEREXE="sudo docker"env var to restore previous defaultTesting
test_openjupyter_security.py)"sudo docker"remains in file