tasmota / docker-tasmota

Docker container with a complete build environment for Tasmota using PlatformIO
77 stars 49 forks source link

Missing documentation regarding user_config_override.h with docker build #12

Closed bogd closed 1 year ago

bogd commented 1 year ago

After spending way too long trying to figure out why my custom tasmota build wouldn't compile using the instructions here, I would like to suggest an update for the docs.

The docs say: "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."

However, if one tries to do that and compile using the docker container, the user_config_override.h is completely ignored. I believe this is because the compile.sh script actually copies the .h file to the ./tasmota/ subdirectory, and that is where the build process can actually find it. However the Docker entrypoint does not seem to use the compile.sh script, so the file needs to be copied to the correct subdirectory manually.

Maybe add a line under "How to use docker container", specifying that in this particular case the override files need to be copied to $(pwd)/Tasmota/tasmota ?

Also, a big THANK YOU to whoever had the idea of providing a Docker image for compiling tasmota - it has made my life (as a person who does not always have a working PIO installation) a lot easier... :)

blakadder commented 1 year ago

the edit button is available if you have something to add

bogd commented 1 year ago

Thank you - I will do that. Being quite new to this "self-compiling Tasmota" thing, I was reluctant to change anything before confirming that I understood the problem correctly.

Thank you once again!

barbudor commented 1 year ago

Compile.sh is intended to be run on the host, not in the container It perform the copy and then run the container As the container has no access to the local files, it is working as expected and AFAIK documented

If you try to run the docker without using compile.sh, you are out of the documented method

bogd commented 1 year ago

@barbudor - Thank you for the clarification!

My confusion was probably generated by the fact that the Readme file, in the section about using the Docker container, explicitly mentions running the container manually (via docker run) . And in that situation, it is a bit unclear where the override files should be placed.

I would argue that since that command is part of the documentation, running the container manually shouldn't qualify as "out of the documented method". I will admit, however, that I (like probably most people trying to do things in a hurry) did not fully read the entire documentation. I jumped straight to the section that seemed relevant to me ("using the docker container") :)

I did do as blakadder suggested, and edited the readme with the clarification that would have helped me in this case.

Thank you once again for your help, and for taking the time to explain the details!