Page 1 of 1

Docker: Super easy compiling and flashing without installing the SDK and all the dependencies

Posted: Mon Oct 24, 2016 7:57 pm
by JustNopIt
For those of you who don't know what Docker is: It allows you to automatically generate containers which are similar to a vm, but use way less resources and can be used like an executable. After you ran it, it simply resets, so you can't break anything.
And the best thing: You don't have to install all the dependencies and the SDK(s). And it just WORKS on any system that runs docker.
So I created two docker images: One for the "ESP32 and ESP31b" and one for the "ESP8266 and ESP8266EX".
If you are interested check it out on Github: https://github.com/T-vK/docker-esp-sdk/tree/esp32

To build the docker image you just have to install docker and run these three lines:

Code: Select all

git clone -b esp32 https://github.com/T-vK/docker-esp-sdk.git
cd docker-esp-sdk
sudo docker build -t tavk/esp32-sdk:0.1.0 .
Usage is super simple:

Compiling

Code: Select all

sudo docker run -t -i -u esp \
-v /home/debian/esp-idf/examples/01_hello_world:/home/esp/shared_project \
tavk/esp32-sdk:0.1.0 \
make all
Flashing

Code: Select all

sudo docker run -t -i -u esp \
--device=/dev/ttyUSB0 \
-v /home/debian/esp-idf/examples/01_hello_world:/home/esp/shared_project \
tavk/esp32-sdk:0.1.0 \
make flash
More detailed info on Github:
https://github.com/T-vK/docker-esp-sdk/tree/esp32

Re: Docker: Super easy compiling and flashing without installing the SDK and all the dependencies

Posted: Mon Oct 24, 2016 8:23 pm
by kolban
This looks great. Have you considered merging this story with Eclipse Che to not only provide a Docker image for compilation but also linking this with a full IDE and project workspace?

https://www.eclipse.org/che/

Re: Docker: Super easy compiling and flashing without installing the SDK and all the dependencies

Posted: Mon Oct 24, 2016 9:37 pm
by JustNopIt
Well, since my docker image can be executed as if it was an executable file, it should be a fairly straight forward task for someone who knows Eclipse Che. But I haven't used that ide yet, so I don't know how this would work.

But just to clarify: Generally speaking the ide and the project folder cannot be inside the docker image.

Re: Docker: Super easy compiling and flashing without installing the SDK and all the dependencies

Posted: Mon Oct 24, 2016 11:53 pm
by ESP_igrr
Great job!

By the way we also have a docker image which is used for CI builds internally. It it available from docker hub: espressif/esp32-ci-env

We will be updating it soon with new builds of gcc (4.8.5 and 5.2.0). Current 4.8.5 gcc has been found to have a bug in floating point division code.

Re: Docker: Super easy compiling and flashing without installing the SDK and all the dependencies

Posted: Tue Oct 25, 2016 8:53 pm
by JustNopIt
I see you're using Gitlab, yeah I must say I really fell in love with it's CI and CD systems when I used it in the past. :D

Are the SDKs compatible with gcc 5.2.0 yet?

Re: Docker: Super easy compiling and flashing without installing the SDK and all the dependencies

Posted: Wed Oct 26, 2016 1:13 am
by ESP_igrr
We're doing tests to make sure there are no regressions when building with GCC 5.2. As soon as that is done, we'll make an announcement and update toolchain links.

Re: Docker: Super easy compiling and flashing without installing the SDK and all the dependencies

Posted: Mon Jun 10, 2019 4:51 pm
by andyn_ff
I'm looking at the containers provided by Espressif on docker hub. Can anybody clarify the difference between espressif/esp32-ci-env and espressif/esp32-toolchain?

Re: Docker: Super easy compiling and flashing without installing the SDK and all the dependencies

Posted: Fri Sep 06, 2019 10:06 pm
by sch0bert
I don't know the difference between those 2. I will be great if the Espressif guys that uploaded these containers also publish the source code of what is inside.

My project make usage of ULP functionality and I don't know if any docker container published in dockerhub will work for me. Any idea?