Auto-install Docker, add USB drive docs, improve whitelist UI

- lib/common.sh: require_docker now installs Docker CE + Compose plugin
  via get.docker.com instead of erroring out if Docker is missing.
  Also adds the calling user to the docker group automatically.

- README.md: fix 'tells you how to install Docker' → 'installs Docker
  automatically'; add full USB drive usage section (mount, fstab,
  DOCKER_DIR config, moving existing data, tips).

- services/minecraft.sh: replace single-source whitelist import with the
  multi-source UI from the updated setup-minecraft.sh — collects players
  from the current instance, saved backup files, and other servers' backups;
  assigns letters to each source so you can import by letter (all from that
  source) or by number (specific player).

https://claude.ai/code/session_017WJtGcE5jjerAQCUBWUE3H
This commit is contained in:
Claude
2026-06-04 01:37:58 +00:00
parent 5be84d85ea
commit 8aa1d4552d
3 changed files with 207 additions and 46 deletions
+23 -1
View File
@@ -153,8 +153,30 @@ require_root() {
}
require_docker() {
if command -v docker &>/dev/null; then
return 0
fi
log_info "Docker is not installed — installing now..."
if [ "$DRY_RUN" = true ]; then
echo "[DRY-RUN] Would install Docker CE and Docker Compose plugin via get.docker.com"
return 0
fi
# Official Docker convenience script — installs Docker CE + Compose plugin
if curl -fsSL https://get.docker.com | sh; then
if [ -n "$ACTUAL_USER" ] && [ "$ACTUAL_USER" != "root" ]; then
usermod -aG docker "$ACTUAL_USER" \
&& log_info "Added $ACTUAL_USER to the docker group (re-login or run 'newgrp docker' to activate)"
fi
log_success "Docker installed ($(docker --version 2>/dev/null))"
else
log_error "Docker installation failed. Try manually: curl -fsSL https://get.docker.com | sh"
return 1
fi
if ! command -v docker &>/dev/null; then
log_error "Docker is not installed. Install Docker first (run: $0 docker)."
log_error "Docker binary not found after install — something went wrong."
return 1
fi
}