Docker и Compose
Run the control plane and the data plane in containers with Docker Compose, on Linux or a Mac: start, first-login credentials, upgrade and uninstall.
Какую версию вы устанавливаете
Публичная версия — версия для разработки с именем 0.3.0-dev. Её имя не меняется: каждая публикация заменяет предыдущую, а два выпуска различает идентификатор сборки. Стабильной версии пока нет: её опубликуют, только когда каждая система и каждый пакет пройдут сквозное тестирование. Поэтому команды на этой странице устанавливают продукт из канала dev. Версия для разработки может содержать ошибки: прежде чем на неё полагаться, попробуйте её на тестовом сайте.
At a glance
- One image runs the control plane (console and API) or the data plane, selected with TOUTWAF_ROLE; the compose file starts one of each.
- The files (the deploy folder) come with your ToutWAF distribution: they are not in the public repository, which holds binaries and installers only.
- On the very first start, the toutwaf-cp logs show once the secret console address and the generated username and password: copy them, they are written nowhere else.
- The console is published on 127.0.0.1 only: to reach it remotely, use an SSH tunnel, a VPN or a TLS reverse proxy with an allow-list. Never publish 9443 on a public interface.
The commands, step by step
Docker Compose на Mac или Linux
Docker Compose в Linux или на Mac (Docker Desktop, OrbStack, Colima) с образом «всё в одном» (плоскость управления и плоскость данных). Файлы поставляются с вашим дистрибутивом ToutWAF (папка deploy; в открытом репозитории её нет — там только бинарные файлы и установщики). В образ входят готовые бинарные файлы для каждой архитектуры (bin/amd64 или bin/arm64), а сам образ пока не опубликован в реестре. Проверено только на Linux amd64; на реальном Mac не проверялось: за Docker Desktop виден IP-адрес шлюза Docker вместо адреса клиента. Одноразовые учётные данные появляются один раз в журнале плоскости управления.
cd deploy/docker
# bin/amd64/{toutwaf-cp,toutwaf-dp,toutwafctl} (Intel Mac, Linux x86-64)
# bin/arm64/{toutwaf-cp,toutwaf-dp,toutwafctl} (Apple Silicon, Linux ARM)
cp .env.example .env
docker compose up -d --build
docker compose logs toutwaf-cpОбновление (контейнеры)
Сначала сделайте резервную копию. Кнопка обновления в консоли в контейнере работать не может: замените бинарные файлы в папке bin (или образ, когда он будет опубликован) и пересоберите; тома, то есть ваши данные, сохраняются.
docker compose up -d --buildУдаление
Первый блок удаляет службы, бинарные файлы и правила брандмауэра, добавленные ToutWAF, и сохраняет ваши данные. Второй дополнительно удаляет настройки, данные и журналы.
docker compose downdocker compose down -vWhat is not verified
We prefer to say it plainly.
- Tested end to end on Linux x86-64 only. An Intel Mac, an Apple Silicon Mac (linux/arm64) and Windows with Docker Desktop are not tested on real hardware.
- No image is published to a registry: building needs the prebuilt release binaries. Native macOS is not provided.
- The in-console update and the firewall helper do not work in a container: you update by replacing the image. A single control-plane instance, with SQLite.