sonoff -> tasmota in docker container

This commit is contained in:
blakadder 2019-11-09 03:56:30 +01:00
parent cb3f6c75fc
commit 8f64d13074
2 changed files with 4 additions and 4 deletions

View File

@ -8,13 +8,13 @@ This Container will setup a proper build environment for [Tasmota](https://githu
Use instead of the container `mytasmota:latest` the published container `eddyhub/docker-tasmota:latest` from docker hub.
## Build all development binaries
`git clone https://github.com/arendst/Tasmota.git`
`git clone https://github.com/arendst/Tasmota.git`
`docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -u $UID:$GID mytasmota:latest`
## Build a specific binary with custom options
Checkout Tasmota: `git clone https://github.com/arendst/Tasmota.git`
Mount the source as volume in `/tasmota`. **Prefix** any parameter available in `Tasmota/sonoff/my_user_config.h` with `TASMOTA_` as a environment variable for the container. **Also don't forget to escape what needs to be escaped in your shell.** **Strings** should be in **double quotes**. My config example:
`docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -e TASMOTA_STA_SSID1='"my-wifi"' -e TASMOTA_STA_PASS1='"my-wifi-password"' -e TASMOTA_MQTT_HOST='my-mqtt-host' -e TASMOTA_MQTT_USER='"my-mqtt-user"' -e TASMOTA_MQTT_PASS='"my-mqtt-password"' -e TASMOTA_WEB_PASSWORD='"my-web-password"' -u $UID:$GID mytasmota:latest --environment sonoff-DE
Mount the source as volume in `/tasmota`. **Prefix** any parameter available in `Tasmota/sonoff/my_user_config.h` with `TASMOTA_` as a environment variable for the container. **Also don't forget to escape what needs to be escaped in your shell.** **Strings** should be in **double quotes**. My config example:
`docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -e TASMOTA_STA_SSID1='"my-wifi"' -e TASMOTA_STA_PASS1='"my-wifi-password"' -e TASMOTA_MQTT_HOST='my-mqtt-host' -e TASMOTA_MQTT_USER='"my-mqtt-user"' -e TASMOTA_MQTT_PASS='"my-mqtt-password"' -e TASMOTA_WEB_PASSWORD='"my-web-password"' -u $UID:$GID mytasmota:latest --environment sonoff-DE`
Now you should have the file Tasmota/.pioenvs/sonoff-DE/firmware.bin which can be flashed on your device.

View File

@ -2,7 +2,7 @@
#!/bin/bash
TASMOTA_VOLUME='/tasmota'
USER_CONFIG_OVERRIDE="${TASMOTA_VOLUME}/sonoff/user_config_override.h"
USER_CONFIG_OVERRIDE="${TASMOTA_VOLUME}/tasmota/user_config_override.h"
if [ -d $TASMOTA_VOLUME ]; then
cd $TASMOTA_VOLUME