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
+6 -8
View File
@@ -26,9 +26,9 @@ sudo ./install-rubix.sh
The script will:
1. Ask for your **Gitea token** (if `GITEA_TOKEN` is not already exported)
2. Create **`/home/www/callcenter`**
3. Download and unpack the latest **rubix** release there
1. `apt update` / `upgrade`, install tools, **Docker** + compose plugin
2. Ask for your **Gitea token** (if `GITEA_TOKEN` is not already exported)
3. Create **`/home/www/callcenter`** and download the latest **rubix** release
Optional: specific version `sudo ./install-rubix.sh v1.1.10`
Optional: other path `sudo RUBIX_INSTALL_PATH=/opt/rubix ./install-rubix.sh`
@@ -41,14 +41,12 @@ cp .env.example .env
nano .env
```
Set at least: `GITEA_REGISTRY_PULL_TOKEN` (same token as step 1), `MYSQL_ROOT_PASSWORD`, DB users/passwords, `COMPOSE_PROFILES`, domains, `RUBIX_STORAGE_ROOT`.
Set at least: `GITEA_REGISTRY_PULL_TOKEN` (same token as step 1), `GITEA_REGISTRY_PULL_USER`, `MYSQL_ROOT_PASSWORD`, DB users/passwords, `COMPOSE_PROFILES`, domains, `RUBIX_STORAGE_ROOT`.
Install Docker if not present:
Registry login before pull / `up.sh`:
```bash
apt-get install -y docker.io docker-compose-plugin
systemctl enable --now docker
echo '<token>' | docker login gitea.dialer.work -u <user> --password-stdin
echo '<token>' | docker login gitea.dialer.work -u <gitea-user> --password-stdin
```
Start:
+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"