Feat/allow docker private images#364
Conversation
…d credential management
…registry authentication commands
…d precedence documentation
…ring and managing credentials
…environment variable overrides
…te non-validation
…n registry credentials loading
…figuration and handler files
…uthentication files
…stry authentication files
…t in sandbox initialization
|
I found some strange behavior in a few cases that isn’t always consistent, and it seems related to how much hardware is available on the host machine. With CPU values < 1, initialization can get stuck and the portal never finishes starting up because it hasn’t been able to reserve the capacity required to begin. I’m going to keep investigating and thinking about how this could be avoided. I was considering using something similar to Kubernetes behavior—reserving resources at startup and then readjusting them once the system is running. I’m also open to any comments or suggestions on this. |
|
thanks for submitting the PR. could you split your changes into separate PRs. ty! also, for the private registry changes, kindly rebase on #351 which modifies quite a lot of the layer pulling logic to support multiple registries. the auth mode is currently hardcoded, so that'd need to be changed to pick up credentials from the various mediums you proposed. |
|
@toksdotdev sure! Working on it! |
|
@toksdotdev I'm closing this PR to follow up on it in the PRs #362 #369 #368 |
This pull request builds on #310 by enabling pulling private images, adds port configuration as a complement to #349, and introduces fractional CPU support (Linux only, due to the cgroups v2 API).
It introduces the following improvements:
Registry authentication improvements:
msb login), Docker config, and finally anonymous access. This is implemented in the newresolve_registry_authfunction inmicrosandbox-core/lib/management/image.rs, with comprehensive tests. TheRegistry::newconstructor and all call sites were updated to accept an explicitRegistryAuthparameter. [1] [2] [3] [4]msb loginandmsb logoutfor managing stored registry credentials, and updated CLI argument parsing to support their options.Fractional CPU support:
cpusfield inSandbox,Build, andSandboxBuilderstructs fromu8tof32, allowing fractional values (e.g.,0.5,0.25). Updated related builder methods and all usages, including tests, to handle floating-point values. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Other improvements:
build_libkrunMakefile target to usebashexplicitly for compatibility.Note
I’m not a Rust expert, so I used coding agents, SDD, and the coding standards I know to implement these changes. I also reviewed all the code included in this PR.
Feel free to share corrections and suggestions.