zot update
This commit is contained in:
parent
f14edcdf1d
commit
f5158e5d7c
@ -23,14 +23,29 @@ function update_script() {
|
|||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
if [[ ! -d /var ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
if [[ ! -f /usr/bin/zot ]]; then
|
||||||
|
msg_error "No ${APP} installation found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
msg_info "Updating $APP LXC"
|
|
||||||
$STD apt-get update
|
RELEASE=$(curl -fsSL https://api.github.com/repos/project-zot/zot/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')
|
||||||
$STD apt-get -y upgrade
|
if [[ ! -f ~/.${APP} ]] || [[ "${RELEASE}" != "$(cat ~/.${APP})" ]]; then
|
||||||
msg_ok "Updated $APP LXC"
|
msg_info "Stopping Zot service"
|
||||||
|
systemctl stop zot
|
||||||
|
msg_ok "Stopped Zot service"
|
||||||
|
|
||||||
|
msg_info "Updating Zot to ${RELEASE}"
|
||||||
|
curl -fsSL "https://github.com/project-zot/zot/releases/download/${RELEASE}/zot-linux-amd64" -o /usr/bin/zot
|
||||||
|
chmod +x /usr/bin/zot
|
||||||
|
chown root:root /usr/bin/zot
|
||||||
|
echo "${RELEASE}" >~/.${APP}
|
||||||
|
systemctl restart zot
|
||||||
|
msg_ok "Updated Zot to ${RELEASE}"
|
||||||
|
else
|
||||||
|
msg_ok "Zot is already up to date (${RELEASE})"
|
||||||
|
fi
|
||||||
|
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
35
frontend/public/json/zot-registry.json
Normal file
35
frontend/public/json/zot-registry.json
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"name": "Zot Registry",
|
||||||
|
"slug": "zot",
|
||||||
|
"categories": [
|
||||||
|
13
|
||||||
|
],
|
||||||
|
"date_created": "2025-06-05",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 8080,
|
||||||
|
"documentation": "https://zotregistry.dev/docs/intro/",
|
||||||
|
"website": "https://zotregistry.dev/",
|
||||||
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/zot-registry.webp",
|
||||||
|
"config_path": "/etc/zot/config.json",
|
||||||
|
"description": "Zot is a cloud-native OCI image registry focused on extensibility, maintainability, and performance. It supports advanced features such as Web UI, security scanning, authentication via htpasswd and OIDC, and more.",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/zot-registry.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 2,
|
||||||
|
"ram": 1024,
|
||||||
|
"hdd": 3,
|
||||||
|
"os": "Debian",
|
||||||
|
"version": "12"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": null,
|
||||||
|
"password": null
|
||||||
|
},
|
||||||
|
"notes": []
|
||||||
|
}
|
@ -26,6 +26,12 @@ mkdir -p /etc/zot
|
|||||||
curl -fsSL https://raw.githubusercontent.com/project-zot/zot/refs/heads/main/examples/config-ui.json -o /etc/zot/config.json
|
curl -fsSL https://raw.githubusercontent.com/project-zot/zot/refs/heads/main/examples/config-ui.json -o /etc/zot/config.json
|
||||||
ZOTPASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
ZOTPASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||||
$STD htpasswd -b -B -c /etc/zot/htpasswd admin "$ZOTPASSWORD"
|
$STD htpasswd -b -B -c /etc/zot/htpasswd admin "$ZOTPASSWORD"
|
||||||
|
{
|
||||||
|
echo "Zot-Credentials"
|
||||||
|
echo "Zot User: admin"
|
||||||
|
echo "Zot Password: $ZOTPASSWORD"
|
||||||
|
} >>~/zot.creds
|
||||||
|
echo "${RELEASE}" >~/.${APP}
|
||||||
msg_ok "Installed Zot Registry"
|
msg_ok "Installed Zot Registry"
|
||||||
|
|
||||||
msg_info "Setup Service"
|
msg_info "Setup Service"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user