Files
ProxmoxVE/ct/zot-registry.sh
T

61 lines
1.8 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
# Copyright (c) 2021-2026 community-scripts ORG
2025-06-06 12:05:28 +02:00
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://zotregistry.dev/ | Github: https://github.com/project-zot/zot
2025-06-06 12:05:28 +02:00
APP="Zot-Registry"
var_tags="${var_tags:-registry;oci}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-4096}"
2025-06-06 12:05:28 +02:00
var_disk="${var_disk:-5}"
var_os="${var_os:-debian}"
2025-10-07 21:23:56 +02:00
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
2025-06-06 12:05:28 +02:00
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /usr/bin/zot ]]; then
msg_error "No ${APP} installation found!"
exit
fi
if check_for_gh_release "zot" "project-zot/zot"; then
2025-06-06 12:05:28 +02:00
msg_info "Stopping Zot service"
systemctl stop zot
msg_ok "Stopped Zot service"
2025-08-14 14:15:24 +02:00
rm -f /usr/bin/zot
fetch_and_deploy_gh_release "zot" "project-zot/zot" "singlefile" "latest" "/usr/bin" "zot-linux-$(arch_resolve)"
2025-08-14 14:15:24 +02:00
msg_info "Configuring Zot Registry"
2025-06-06 12:05:28 +02:00
chown root:root /usr/bin/zot
2025-08-14 14:15:24 +02:00
msg_ok "Configured Zot Registry"
msg_info "Starting service"
systemctl start zot
msg_ok "Service started"
msg_ok "Updated successfully!"
2025-06-06 12:05:28 +02:00
fi
exit
}
start
build_container
description
2026-01-06 22:57:40 +01:00
msg_ok "Completed successfully!\n"
2025-06-06 12:05:28 +02:00
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
echo -e "${GATEWAY}${BGN}http://${IP}:8080${CL}"