Need to run onboarding everytime with Docker and VS Code Extension

standard
Posts: 1
Joined: Fri Jun 05, 2020 9:37 am

Need to run onboarding everytime with Docker and VS Code Extension

Postby standard » Fri Jun 05, 2020 9:51 am

I have set up a docker container with all the tools for VSCode and ESP-IDF. When I launch the container and attach VSCode I need to run the onboarding every time otherwise the build fails and complains about no having the correct python packages. I am saving my settings to settings.json and this stays in my project folder that is mounted in the container from my host machine.

It's as if the extension wont look at my settings.json file till onboarding has been run. After onboarding has been run there is no changes to my settings.json file and i can build my project.

Is this expected behavior? Or am I missing something that needs to be set?

EDIT: I should add that when running onboarding I dont actually download anything, I simply locate specify my python location, ESP-IDF and the tools.

User avatar
ESP_Soumesh
Posts: 19
Joined: Tue Jul 09, 2019 2:21 pm

Re: Need to run onboarding everytime with Docker and VS Code Extension

Postby ESP_Soumesh » Tue Jun 16, 2020 11:51 am

Are you sourcing the export.sh after everytime the container is launched ... ?

atlascoder
Posts: 51
Joined: Wed Aug 30, 2017 12:36 pm

Re: Need to run onboarding everytime with Docker and VS Code Extension

Postby atlascoder » Wed Apr 21, 2021 11:21 am

ESP_Soumesh wrote:
Tue Jun 16, 2020 11:51 am
Are you sourcing the export.sh after everytime the container is launched ... ?
Thank you very much for the clarification!

Though, could you please explain: why when I am running IDF container from terminal on my docker host - I don't need to source `export.sh`, and why it's required when running terminal from VSCode on the same host?

Sorry, I am a newbie with Docker, tried to find but now luck(

atlascoder
Posts: 51
Joined: Wed Aug 30, 2017 12:36 pm

Re: Need to run onboarding everytime with Docker and VS Code Extension

Postby atlascoder » Wed Jul 28, 2021 8:21 am

OK, I can share the solution now.

The problem source is in that the VS Code runs terminal as docker exec ... bash what doesn't run docker ENTRYPOINT script which contains sourcing of /opt/esp/idf/export.sh.

I think there are many ways to make this, but I made by adding

Code: Select all

"terminal.integrated.shellArgs.linux": ["--init-file", "/opt/esp/idf/export.sh"]
to workspace.code-workspace:

Code: Select all

{
	"folders": [
		{
			"path": "."
		}
	],
	"settings": {
		"terminal.integrated.shellArgs.linux": ["--init-file", "/opt/esp/idf/export.sh"]
	}
}

Who is online

Users browsing this forum: No registered users and 23 guests