|
Some checks failed
Tasmota Docker test / build (ubuntu-20.04, 3.10) (push) Has been cancelled
Tasmota Docker test / build (ubuntu-20.04, 3.11) (push) Has been cancelled
Tasmota Docker test / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tasmota Docker test / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Publish Docker / build (push) Has been cancelled
|
||
|---|---|---|
| .github/workflows | ||
| init_pio_tasmota | ||
| .gitignore | ||
| compile.sh | ||
| Dockerfile | ||
| entrypoint.sh | ||
| le_compile.sh | ||
| le_compile.sh2 | ||
| README.md | ||
| user_config_override_example-max.h | ||
| user_config_override_example.h | ||
Docker-Tasmota
Быстрая настройка среды для сборки Tasmota с использованием Docker.
le_compile.sh и compile.sh
Этот скрипт на bash облегчает процесс компиляции, избавляя от необходимости вводить длинные команды каждый раз.
le_compile.sh и compile.sh предназначен для запуска на Linux-системе с установленными Docker и Git. Если каких-то из них не хватает, скрипт выдаст предупреждение с инструкциями по установке.
При первом запуске скрипт загрузит последний контейнер blakadder/docker-tasmota (можно изменить скрипт для использования собственного контейнера), клонирует последнюю ветку разработки Tasmota (для клонирования последней стабильной версии установите USE_STABLE=1 *?(работает только когда используете скрипт compile.sh) ) и скопирует файлы platformio_override.ini и user_config_override.h в папку Tasmota.
Запуск скрипта с указанием одного или нескольких имен сборок (как указано в platformio_tasmota_env.ini) в качестве параметров скомпилирует только эти сборки, независимо от платформы, указанной в platformio.ini или platformio_override.ini.
Новый вариант скрипта:
./le_compile.sh -stable=1 -tasmota=v14.2.0 -bins=tasmota-ir
компилирует tasmota-sensors.bin и португальскую версию Tasmota:
./compile.sh tasmota-sensors tasmota-PT
Если у вас есть файлы user_config_override.h или platformio_override.ini с пользовательскими настройками, поместите их в папку скрипта, и они будут использованы при следующем запуске.
Скрипт будет обновлять папку репозитория до актуальной версии при каждом запуске.
Чтобы проверить логи компиляции, используйте tail -f docker-tasmota.log или cat docker-tasmota.log.
Вариант 1: Настройка готового Docker-контейнера с использованием le_compile.sh
-
Клонируйте этот репозиторий и перейдите в каталог, где он был клонирован (оригинальая версия: https://github.com/tasmota/docker-tasmota):
git clone https://mygit.lkaz.ru/lukas91/docker-Tasmota-platformio-esp8266-esp32 cd docker-tasmota -
Обновите файлы
user_config_override.hи/илиplatformio_override.iniс вашими настройками сборки. -
Запустите le_compile.sh с нужным именем сборки, например:
./le_compile.sh -bins=tasmotaили
./compile.sh tasmotaПри необходимости скрипт
le_compile.shустановит контейнер и репозиторий Tasmota, если вы введете «yes», когда будет предложено. -
По завершении компиляции скомпилированные бинарные файлы и архивы будут находиться в
Tasmota/build_output/firmware, и их можно будет прошить на устройства.
Примечание: Чтобы обновить ранее установленный образ Docker с помощью скрипта compile.sh, выполните:
docker pull blakadder/docker-tasmota
Вариант 2: Настройка Docker-контейнера с нуля
-
Клонируйте этот репозиторий и перейдите в каталог, где он был клонирован (оригинальая версия: https://github.com/tasmota/docker-tasmota):
git clone https://mygit.lkaz.ru/lukas91/docker-Tasmota-platformio-esp8266-esp32 cd docker-tasmota -
Запустите следующую команду для сборки Docker-контейнера:
docker build -t docker-tasmota . -
Перейдите в директорию, куда вы хотите клонировать репозиторий Tasmota:
git clone https://github.com/arendst/Tasmota.git
Если у вас есть файлы user_config_override.h или platformio_override.ini с пользовательскими настройками, поместите их в папку Tasmota/tasmota.
- Из той же директории выполните команду для компиляции нужной сборки:
docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -u $UID:$GID docker-tasmota -e tasmota-PT
-e <buildname>, где может быть любой из сборок, указанных в platformio.ini. Если сборка не указана, будет скомпилирована каждая.
- По завершении компиляции скомпилированные бинарные файлы и архивы будут находиться в
Tasmota/build_output/firmwareдля прошивки на устройства.
Переход на ветку, отличную от development
cd Tasmota
Просмотрите доступные ветки с помощью git branch -a.
Перейдите на ветку release с командой:
git checkout release
Соберите и запустите:
docker run -ti --rm \
-v $(pwd)/Tasmota:/tasmota \
-u $UID:$GID docker-tasmota
ENG:
Docker-Tasmota
Quick setup for building Tasmota using Docker.
le_compile.sh and compile.sh
This bash script simplifies the compilation process, avoiding the need to type long commands every time.
le_compile.sh and compile.sh are designed to run on a Linux system with Docker and Git installed. If any are missing, the script will show a warning with installation instructions.
When run for the first time, the script will pull the latest blakadder/docker-tasmota container (you can modify the script to use your own container), clone the latest Tasmota development branch (for cloning the latest stable version, set USE_STABLE=1 *?(only works when using the compile.sh script) ), and copy the platformio_override.ini and user_config_override.h files into the Tasmota folder.
Running the script with one or more build names (as listed in platformio_tasmota_env.ini) as parameters will compile only those builds, regardless of platformio.ini or platformio_override.ini.
New script variant:
./le_compile.sh -stable=1 -tasmota=v14.2.0 -bins=tasmota-ir
compiles the tasmota-sensors.bin and Portuguese version of Tasmota:
./compile.sh tasmota-sensors tasmota-PT
If you have user_config_override.h or platformio_override.ini files with custom settings, place them in the script folder, and they will be used on the next run.
The script will update the repository folder with the latest version every time it runs.
To check compilation logs, use tail -f docker-tasmota.log or cat docker-tasmota.log.
Option 1: Setup the prebuilt Docker container using le_compile.sh
-
Clone this repository and go to the directory where it was cloned (original version: https://github.com/tasmota/docker-tasmota):
git clone https://mygit.lkaz.ru/lukas91/docker-Tasmota-platformio-esp8266-esp32 cd docker-tasmota -
Update the
user_config_override.hand/orplatformio_override.inifiles with your custom build settings. -
Run le_compile.sh with the desired build name, for example:
./le_compile.sh -bins=tasmotaor
./compile.sh tasmotaIf necessary, the
le_compile.shscript will install the container and Tasmota repository if you type "yes" when prompted. -
When compilation finishes, the compiled binaries and gzipped files will be in
Tasmota/build_output/firmwareand can be flashed to your devices.
Note: To update a previously installed Docker image with the compile.sh script, run:
docker pull blakadder/docker-tasmota
Option 2: Setting up a Docker container from scratch
-
Clone this repository and go to the directory where it was cloned (original version: https://github.com/tasmota/docker-tasmota):
git clone https://mygit.lkaz.ru/lukas91/docker-Tasmota-platformio-esp8266-esp32 cd docker-tasmota -
Run the following command to build the Docker container:
docker build -t docker-tasmota . -
Go to the directory where you want to clone the Tasmota repository:
git clone https://github.com/arendst/Tasmota.git
If you have user_config_override.h or platformio_override.ini files with custom settings, place them under Tasmota/tasmota.
- From the same directory, run the command to compile the desired build:
docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -u $UID:$GID docker-tasmota -e tasmota-PT
-e <buildname>, where can be any of the builds listed in platformio.ini. If no build is specified, every build will be compiled.
- When compilation finishes, the compiled binaries and gzipped files will be in
Tasmota/build_output/firmwarefor flashing to devices.
Switching to a branch other than development
cd Tasmota
View available branches with git branch -a.
Switch to the release branch with:
git checkout release
Build it and run:
docker run -ti --rm \
-v $(pwd)/Tasmota:/tasmota \
-u $UID:$GID docker-tasmota