mirror of
https://github.com/shadoll/just-commons.git
synced 2026-08-28 11:33:18 +00:00
Refactor: Add core.just and fix universal structure
- Add core.just with common utilities: - _detect_runtime: Detect Docker/Podman - _detect_compose: Detect compose command - env-check: Environment validation - Fix container.just to be fully universal (remove servass-specific code) - Move _detect_runtime from images.just to core.just - Update container.just to use proper universal operations Universal structure now: - core.just: Common utilities - container.just: Universal container operations - registry.just: Registry authentication - images.just: Universal image operations
This commit is contained in:
-12
@@ -1,17 +1,5 @@
|
||||
# Universal image operations - works for any project
|
||||
|
||||
# Detect container runtime
|
||||
_detect_runtime:
|
||||
#!/usr/bin/env bash
|
||||
if command -v docker >/dev/null 2>&1 && docker info >/dev/null 2>&1; then
|
||||
echo "docker"
|
||||
elif command -v podman >/dev/null 2>&1; then
|
||||
echo "podman"
|
||||
else
|
||||
echo "Error: No container runtime available (docker or podman)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Build any project's container image
|
||||
build project *args="":
|
||||
#!/usr/bin/env bash
|
||||
|
||||
Reference in New Issue
Block a user