Skip to content

Comments

fix: remove hardcoded sudo docker and respect DOCKEREXE override in mkconcore.py (fixes #343)#421

Open
GaneshPatil7517 wants to merge 1 commit intoControlCore-Project:devfrom
GaneshPatil7517:fix/dockerexe-config-respected
Open

fix: remove hardcoded sudo docker and respect DOCKEREXE override in mkconcore.py (fixes #343)#421
GaneshPatil7517 wants to merge 1 commit intoControlCore-Project:devfrom
GaneshPatil7517:fix/dockerexe-config-respected

Conversation

@GaneshPatil7517
Copy link

@GaneshPatil7517 GaneshPatil7517 commented Feb 19, 2026

Hello @pradeeban Sir
This PR resolves #343 by removing all hardcoded "sudo docker" from mkconcore.py and ensuring the DOCKEREXE variable is used consistently.

Problem

  • DOCKEREXE defaulted to "sudo docker", failing on Docker Desktop (macOS/Windows), rootless Docker, and Podman
  • Generated maxtime, params, and unlock scripts hardcoded "sudo docker" instead of using DOCKEREXE

Changes (19 lines, single file)

  1. Default: DOCKEREXE = os.environ.get("DOCKEREXE", "docker") — defaults to "docker", overridable via env var
  2. Generated scripts: All 18 hardcoded "sudo docker" in maxtime, params, and unlock script generation replaced with f'{DOCKEREXE} ...'

Backward Compatibility

  • concore.sudo config still overrides DOCKEREXE (unchanged logic at line ~180)
  • Users can set DOCKEREXE="sudo docker" env var to restore previous default

Testing

  • 83/83 tests pass (9 pre-existing errors in unrelated test_openjupyter_security.py)
  • Verified no "sudo docker" remains in file
  • Line endings preserved — no spurious diff noise

Copilot AI review requested due to automatic review settings February 19, 2026 06:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 DOCKEREXE from "sudo docker" to "docker" with environment variable override support
  • Replaced 18 hardcoded "sudo docker" strings in generated maxtime, params, and unlock scripts with dynamic DOCKEREXE variable references
  • Maintained backward compatibility via existing concore.sudo config file override and new DOCKEREXE environment variable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Rahuljagwani
Copy link
Contributor

Hi @GaneshPatil7517
DOCKEREXE was not there in the environment config file before. You have introduced it now, I think we need to include it in README.md also to help users set it up. Code-wise PR looks good to me. @pradeeban, please share your thoughts on this, as I missed the past changes. I am revising the codebase again.

@GaneshPatil7517
Copy link
Author

GaneshPatil7517 commented Feb 19, 2026

Hi @GaneshPatil7517 DOCKEREXE was not there in the environment config file before. You have introduced it now, I think we need to include it in README.md also to help users set it up. Code-wise PR looks good to me. @pradeeban, please share your thoughts on this, as I missed the past changes. I am revising the codebase again.

Hi @Rahuljagwani Sir, thank you for the review
Great point since DOCKEREXE is now a configurable environment variable, it should be documented. I'll add a section in README.md covering:

  • Default behavior (docker)
  • Environment variable override (DOCKEREXE)
  • concore.sudo config file override (existing mechanism)
  • Example usage for Podman, rootless Docker, and sudo Docker

I'll push the README update to this same branch shortly.

@pradeeban
Copy link
Member

Yes, pls add the README.md update to this same PR and tag me. @GaneshPatil7517

@GaneshPatil7517
Copy link
Author

Yes, pls add the README.md update to this same PR and tag me. @GaneshPatil7517

Sure @pradeeban sir give me some time....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants