Files
ProxMenux/scripts/oci/oci_manager_apps.sh
T
MacRimiandClaude Opus 5 bcabcb618c feat(oci): run official container images as native LXC containers
Adds the OCI manager: an engine that turns a Docker Compose file into an
LXC definition, a catalog of 365 applications drawn from LinuxServer.io
and other container image sources, and a per-instance registry recording
what each container was built from. Reachable from the main menu.

Catalog text is translated like every other string in the project: the
taglines go through translate() and land in lang/*.json, so the entries
read in all eight languages instead of only English.

Translation cache builder:
- a failed translation leaves the key absent rather than writing English,
  which previously made the string count as translated forever
- a result identical to a 3+ word source is rejected, catching a provider
  that silently returns the text it was given
- strings that are nothing but glossary terms keep their source spelling
  instead of being discarded as failures
- no backoff between attempts when the provider is deterministic
- application names are protected so "HAOS One" survives translation
- argos joins the provider list, and the workflow reads the OCI sources

Audit & Report:
- findings that moved in the wrong direction between runs are reported
  alongside the ones that improved
- an accepted risk can carry a review date and is flagged when it falls due
- backup checks explain in plain language what they looked at and what to
  do next

Monitor:
- disks can be excluded from periodic reads, and an idle disk says so
  instead of showing a stale temperature
- per-disk identity survives a controller or enclosure change
- scheduled Borg backups resolve their SSH key from the repository entry
- PVE upgrades log the package list and the resulting dpkg changes

The web build no longer copies scripts/ into public/: the documentation
links to GitHub, so nothing read that folder.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 18:24:59 +02:00

71 lines
2.3 KiB
Bash
Executable File

#!/bin/bash
# ==========================================================
# ProxMenux - OCI manager Apps (beta)
# ==========================================================
# Author : MacRimi
# Copyright : (c) 2024 MacRimi
# License : GPL-3.0
# https://github.com/MacRimi/ProxMenux/blob/main/LICENSE
# Version : 1.0
# ==========================================================
# Description:
# Installs official container images as native Proxmox OCI
# LXC containers from the ProxMenux catalog, and manages the
# instances it created. The catalog and the installer live in
# the OCI engine ($BASE_DIR/oci/engine).
# ==========================================================
LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts"
BASE_DIR="/usr/local/share/proxmenux"
UTILS_FILE="$BASE_DIR/utils.sh"
OCI_ENGINE_DIR="$BASE_DIR/oci/engine"
if [[ -f "$UTILS_FILE" ]]; then
source "$UTILS_FILE"
fi
if [[ -f "$LOCAL_SCRIPTS/global/pmx_journal.sh" ]]; then
source "$LOCAL_SCRIPTS/global/pmx_journal.sh"
fi
load_language
initialize_cache
ensure_oci_dependencies() {
local -a missing=()
python3 -c 'import yaml' >/dev/null 2>&1 || missing+=("python3-yaml")
command -v skopeo >/dev/null 2>&1 || missing+=("skopeo")
[[ ${#missing[@]} -eq 0 ]] && return 0
show_proxmenux_logo
msg_title "$(translate "OCI manager Apps (beta)")"
msg_info "$(translate "Installing required packages...")"
apt-get update >/dev/null 2>&1
local status
if declare -F pmx_install_pkg >/dev/null; then
pmx_journal_context "ensure_oci_dependencies" "1.0" "oci_manager_apps.sh"
pmx_install_pkg "${missing[@]}"
status=$?
else
DEBIAN_FRONTEND=noninteractive apt-get install -y "${missing[@]}" >/dev/null 2>&1
status=$?
fi
if [[ $status -ne 0 ]]; then
msg_error "$(translate "Could not install the required packages:") ${missing[*]}"
return 1
fi
stop_spinner
}
if [[ ! -f "$OCI_ENGINE_DIR/src/proxmenux_oci/__main__.py" ]]; then
msg_error "$(translate "The OCI engine is not installed. Update ProxMenux and try again.")"
exit 1
fi
ensure_oci_dependencies || exit 1
if [[ $# -gt 0 ]]; then
PYTHONPATH="$OCI_ENGINE_DIR/src" exec python3 -m proxmenux_oci "$@"
fi
PYTHONPATH="$OCI_ENGINE_DIR/src" python3 -m proxmenux_oci
exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh"