Install Docker in step 1; document registry login in step 2

- install-rubix.sh: apt install docker.io and compose plugin, enable daemon
- README: step 1 lists Docker install; step 2 keeps docker login before up.sh
This commit is contained in:
Sinisa Madzar
2026-06-01 08:06:38 +02:00
parent ea1dd13c22
commit 9e60ae40cc
2 changed files with 26 additions and 10 deletions
+20 -2
View File
@@ -24,6 +24,7 @@ GITEA_TOKEN="${GITEA_TOKEN:-${GITEA_REGISTRY_PULL_TOKEN:-}}"
TAG="${1:-}"
APT_PACKAGES=(unzip wget curl python3 ca-certificates git rsync)
DOCKER_PACKAGES=(docker.io docker-compose-plugin)
prepare_system() {
if [[ "$(id -u)" -ne 0 ]]; then
@@ -43,6 +44,22 @@ prepare_system() {
fi
echo "[install-rubix] apt-get install ${APT_PACKAGES[*]} ..."
apt-get install -y "${APT_PACKAGES[@]}"
ensure_docker
}
ensure_docker() {
if command -v docker >/dev/null 2>&1; then
echo "[install-rubix] docker already installed: $(docker --version)"
else
echo "[install-rubix] apt-get install ${DOCKER_PACKAGES[*]} ..."
apt-get install -y "${DOCKER_PACKAGES[@]}"
fi
systemctl enable --now docker
if ! docker info >/dev/null 2>&1; then
echo "[install-rubix] ERROR: docker installed but daemon not running." >&2
exit 1
fi
echo "[install-rubix] docker OK ($(docker compose version 2>/dev/null | head -1 || docker --version))"
}
prompt_token() {
@@ -99,8 +116,9 @@ fi
rm -f rubix.zip
echo ""
echo "[install-rubix] done — ${RUBIX_INSTALL_PATH} (${TAG})"
echo "[install-rubix] next (see rubix README step 2):"
echo "[install-rubix] next (see rubix-deploy README step 2):"
echo " cd ${RUBIX_INSTALL_PATH}/deploy/docker"
echo " cp .env.example .env"
echo " nano .env"
echo " nano .env # set GITEA_REGISTRY_PULL_TOKEN, passwords, domains"
echo " # docker login before up.sh (see README step 2)"
echo " sudo ./up.sh"