tonilopezortiz78 / docker-tasmota

Docker container with a complete build environment for Tasmota using PlatformIO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker-Tasmota

Quickly set up a build environment for Tasmota using Docker

compile.sh

This bash script makes compiling a lot easier without the need to type lengthy commands each time.

compile.sh is intended to run on a linux machine with docker and git installed. If you're missing any of these the script will pop a warning with instructions how to install.

Running the script for the first time will pull the latest blakadder/docker-tasmota container (you can edit the script to use your own docker container), clone the latest Tasmota development branch (you can change to clone the latest stable release version by setting USE_STABLE=1) inside the script folder and copy platformio_override.ini and user_config_override.h to Tasmota folder.

Running the script with one or more build names (as listed in platformio_tasmota_ev.ini) as parameters will compile only those builds regardless of platformio.ini or platformio_override.ini

./compile.sh tasmota-sensors tasmota-PT
compiles both the tasmota-sensors.bin and the portuguese language version of Tasmota

If you have a user_config_override.h or platformio_override.ini file with your custom settings you can put them in the script folder and they will be used on the next script run.

Script will update the repo folder with the latest one every run.

To check compiling logs use cat docker-tasmota.log

How to use the docker container

  1. Clone this repo and cd to the dir where its cloned:

    git clone https://github.com/tasmota/docker-tasmota
    cd docker-tasmota
    
  2. Run this to build the docker container: docker build -t docker-tasmota .

    1. Instead of 1. and 2: you can grab the latest docker image with docker pull blakadder/docker-tasmota
  3. Move to a directory where you want to clone Tasmota repo:

    git clone https://github.com/arendst/Tasmota.git
    
  4. From the same directory run 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 you don't define a build then every build will get compiled.

  1. When compiling finishes you should have the compiled binary and gzipped version in Tasmota/build_output/firmware which can be flashed on your devices.

Switch branch other than development

cd Tasmota

List branches with git branch -a

Switch to release branch with

git checkout release

Build it and run:

docker run -ti --rm \
-v $(pwd)/Tasmota:/tasmota \
-u $UID:$GID docker-tasmota

About

Docker container with a complete build environment for Tasmota using PlatformIO


Languages

Language:C 64.0%Language:C++ 22.7%Language:Makefile 9.0%Language:HTML 3.2%Language:Python 0.8%Language:Processing 0.1%Language:Ruby 0.0%Language:Shell 0.0%Language:CMake 0.0%Language:CSS 0.0%Language:Meson 0.0%Language:JavaScript 0.0%Language:Roff 0.0%Language:Yacc 0.0%Language:XSLT 0.0%Language:PHP 0.0%Language:sed 0.0%Language:Batchfile 0.0%Language:Dockerfile 0.0%Language:Elixir 0.0%