diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fff2e06 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2025 Stepan Kasatkin + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..1b4f9ee --- /dev/null +++ b/README.md @@ -0,0 +1,103 @@ +# 🐳 Установщик Rootless Docker + Docker Compose + +Интерактивный Bash-установщик для быстрой установки **Docker в режиме Rootless**, **Docker Compose**, а также удаления всего установленного окружения. + +--- + +## Структура репозитория + +``` +. +├── version +│ # self-update file +└── scripts/ + ├── docker-install.sh # основной установщик + └── docker-installer-init.sh # загрузчик установщика (размещается в /etc/profile.d) +``` + +--- + +## Зависимости + +Для работы скрипта необходимо наличие следующих пакетов: + +| Утилита | Назначение | +|-------------|--------------------------------| +| `curl` | Загрузка файлов по HTTP(S) | +| `bash` | Интерпретация скриптов | +| `tput` | Цветной вывод в терминале | +| `whiptail` | Диалоговое меню в терминале | +| `ncurses` | Управление курсором/цветами | + +### Установка зависимостей: + +#### Ubuntu / Debian: +```bash +sudo apt update +sudo apt install -y curl bash whiptail ncurses-bin +``` + +--- + +## Установка через `curl` + +### Только запуск на текущего пользователя: +```bash +curl -fsSL https://gitea.wssk.ru/sk/docker-rootless-install/raw/branch/master/docker-install.sh | bash +``` + +### Постоянная установка и запуск на текущего пользователя: +```bash +sudo curl -fsSL https://gitea.wssk.ru/sk/docker-rootless-install/raw/branch/master/docker-install.sh \ + -o ./docker-install.sh +sudo chmod +x ./docker-install.sh +``` + +Запуск: +```bash +./docker-install.sh +``` + +После запуска появится меню с выбором: +- Установить Docker (rootless) +- Установить Docker Compose +- Установить всё сразу +- Удалить Docker и все связанные данные + +⚠️ Последний пункт использовать с осторожностью! + +--- + +### Глобальная установка (для всех пользователей через `/etc/profile.d`) + +1. Скачивание и размещение в `/etc/profile.d/`: +```bash +sudo curl -fsSL https://gitea.wssk.ru/sk/docker-rootless-install/raw/branch/master/scripts/docker-installer-init.sh \ + -o /etc/profile.d/docker-installer-init.sh +sudo chmod +x /etc/profile.d/docker-installer-init.sh +``` + +2. После этого, при крайнем входе в терминал каждый пользователь: + - Получит скрипт в `~/scripts/docker-install.sh` + - Увидит приветственное окно + - Сможет запустить установку + +--- + +## Автообновление + +Скрипт автоматически проверяет наличие новой версии (по файлу `version`) и при необходимости скачивает обновлённый `docker-install.sh` из репозитория. + +--- + +## Удаление + +Меню скрипта содержит опцию **"Удалить Docker и ВСЕ данные"**, которая удаляет: + +- Контейнеры +- Образы +- Тома +- Конфиги Docker Rootless +- Бинарники Docker и Docker Compose + +⚠️ Использовать с осторожностью! \ No newline at end of file