Last active
September 20, 2019 23:00
-
-
Save joba-1/1375a954167c79ff5531d85285d52a52 to your computer and use it in GitHub Desktop.
Docker file to build tasmota firmware
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Document requirements for building Tasmota firmware by creating a docker image :) | |
# | |
# Usage | |
# Install docker and git on your os, e.g. on opensuse: | |
# sudo zypper install docker git | |
# Start docker service on your os, e.g. on systemd based distros like opensuse: | |
# sudo systemctl start docker | |
# Build docker image | |
# sudo docker build -t tasmota /path/to/this/file/ | |
# Clone Tasmota git repository or some fork, e.g. | |
# git clone https://github.com/arendst/Sonoff-Tasmota | |
# Modify platformio.ini if needed, e.g. to | |
# select the espressif core version | |
# select your default environment (e.g. sonoff-DE) | |
# select your upload port and speed | |
# ... | |
# Modify sonoff/my_user_config.h if needed, e.g. to | |
# set your wifi credentials | |
# set your mqtt server | |
# set your syslog server | |
# ... | |
# Run docker image and build all environments (or use -e to select one, or replace pio run with whatever) | |
# sudo docker run --rm -u $UID -v /full/path/to/git/repo/Sonoff-Tasmota:/tasmota tasmota pio run | |
# Use a sane, recent os as basis | |
FROM opensuse/leap:15.1 | |
# Install pip with all requirements and wget on above os | |
RUN zypper in -y python3-pip | |
# Upgrade pip to latest | |
RUN pip install --upgrade pip | |
# UTF-8 required for PlatformIO | |
ENV LC_ALL=C.UTF-8 | |
ENV LANG=C.UTF-8 | |
# Install latest PlatformIO | |
RUN pip install platformio | |
# Provide external Sonoff-Tasmota git repo with your desired version and optional changes | |
VOLUME ["/tasmota"] | |
# Where platformio.ini is expected if you do a pio run | |
WORKDIR /tasmota | |
# Some programs need a HOME | |
ENV HOME=/tmp | |
# Present options if none given | |
CMD ["pio", "run", "--help"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment