ESP-IDF Docker: Keep env variables from entrypoint
Posted: Sat Mar 04, 2023 5:01 pm
I’ve searched for long, and i found it strange i cannot find a solution.
I create a docker container like this:
docker run -dit --name test -w /project espressif/idf bash
Then i try to build my app like:
docker exec -it test idf.py build
but idf.py is not recognized.
If i rerun the entrypoint, everything is fine but it takes some extra seconds everytime i do a build:
docker exec -dit test /opt/esp/entrypoint.sh idf.py build
But if i do:
docker run -it --name test -w /project espressif/idf bash
and do:
idf.py build
many times, I have the entrypoint variables working fine.
So, my question is: can i use the terminal that is create at my first run command every time and keeping in this way my variables:
docker run -dit --name test -w /project espressif/idf bash
Alternative Solution: Can i set only some paths and never run the export.sh file?
I create a docker container like this:
docker run -dit --name test -w /project espressif/idf bash
Then i try to build my app like:
docker exec -it test idf.py build
but idf.py is not recognized.
If i rerun the entrypoint, everything is fine but it takes some extra seconds everytime i do a build:
docker exec -dit test /opt/esp/entrypoint.sh idf.py build
But if i do:
docker run -it --name test -w /project espressif/idf bash
and do:
idf.py build
many times, I have the entrypoint variables working fine.
So, my question is: can i use the terminal that is create at my first run command every time and keeping in this way my variables:
docker run -dit --name test -w /project espressif/idf bash
Alternative Solution: Can i set only some paths and never run the export.sh file?