Add podman support and registry login to container scripts#3497
Conversation
…ipts Replace hard-coded docker references with cached runtime detection that supports both docker and podman, including their compose variants. Add registry_login to run/build commands to avoid 403 errors when pulling images. Matching logic applied to both sh and bat scripts. Co-Authored-By: Claude noreply@anthropic.com
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3497 +/- ##
==========================================
- Coverage 79.32% 79.29% -0.04%
==========================================
Files 670 689 +19
Lines 56846 57334 +488
Branches 728 728
==========================================
+ Hits 45095 45463 +368
- Misses 11673 11793 +120
Partials 78 78
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Use modern $() syntax instead of backticks for pwd in cli and cliroot volume mount arguments for consistency and readability.
…heck-if-logged-into-container-registry
Add registry authentication checks to avoid overwriting valid stored credentials with stale environment variables. In openc3_build_ubi.sh, use docker manifest inspect to verify access before attempting login. In openc3.sh, check Docker/Podman config files for existing credentials. Rescue Redis connection errors in StoreQueued shutdown to prevent CI test failures when Redis is unavailable during process exit.
…ariable' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
jmthomas
left a comment
There was a problem hiding this comment.
I made equivalent change to store_queued.py. This change forced me to login to docker.io during the build but I think that's ok. I previously was building fine without this login.
|
ryanmelt
left a comment
There was a problem hiding this comment.
These changes can cause using podman-compose which is not supported. :(
Same fix as openc3.sh/openc3.bat for the third script touched in #3497. The standalone compose fallback was ${_RUNTIME}-compose, resolving to podman-compose under podman. Hardcode it to docker-compose. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>



Summary
DockerandPodman(including podman compose and podman-compose variants)run,run-ubi, andbuildcommands to avoid 403 errors when pulling images — logs intoOPENC3_REGISTRY(core) andOPENC3_ENTERPRISE_REGISTRY(enterprise) using interactive credentialsopenc3.shandopenc3.batChanges
openc3.shdockerorpodman${DOCKER_COMPOSE_COMMAND}references replaced with${CONTAINER_CMD}and${CONTAINER_COMPOSE_CMD}openc3.bat:registry_loginsubroutine with matching logicscripts/linux/openc3_test.shDOCKER_COMPOSE_COMMANDfrom parent if available, otherwise detects runtime with podman supportscripts/linux/openc3_util.shopenc3/lib/openc3/utilities/store_queued.rbprocess_queue()call inshutdownwith a rescue block. This fixes the CI failure where all tests pass but theat_exithook raisesRedis::CannotConnectErrorwhen Redis is unavailable during process shutdown, causing exit code 1.Closes #3497