-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
espressif/idf dockerfile writes to host filesystem as wrong owner (IDFGH-13794) #14652
Comments
Hello @tobiashagge , thank you for bringing this to our attention. Isn't it possible to fix/adjust this on the VSC devcontainer side? I believe, if you delete the
The problem you are facing is that the docker user, in this case
When the
The esp-idf container does not add any users and I believe that the right place to handle this is in the VSC devcontainer. What are your thoughts on this? Thank you |
Thank you for your detailed reply. I don't see the same log messages anywhere in "Dev Containers Developer: Show All Logs..." (maybe a version issue), but I think your take is correct, and I appreciate the additional context. I'll move this back to vscode-esp-idf-extension. It looks like the issue can be resolved by adding one line to a template file. |
@tobiashagge , thank you for looking into this again. I'm no VSC user and this was the first time I was looking into the devcontainers and VSC in general, so I for sure could have missed something. It seems that the extension is using already cached images, so I modified the Docker file and rebuild it . Here are my steps.
Here you should hopefully see it. with cached image
without cached image
|
I'm closing this with the assumption that this will be addressed by espressif/vscode-esp-idf-extension#1320. We will re-open if this changes. |
Answers checklist.
IDF version.
5.3.1
Operating System used.
Windows
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
What is the expected behavior?
Commands in example project containers derived from espressif/idf should write files as the 'esp' user.
What is the actual behavior?
Files are written as 'ubuntu' user, even though whoami shows the current user as 'esp'. idf.py throws many permission denied errors.
Steps to reproduce.
Install WSL, VSCcode, C++ build tools, and ESP-IDF as per the directions. Create a copy of hello_world example project (also tested with blink) using the VS code interface. Launch the dev container.
Build or installation Logs.
More Information.
The cause of the issue is explained at this link.; as of 24.04 the ubuntu image sets up a default user. Possible solutions are to downgrade the ubuntu base image, reconfigure the image to run as the ubuntu user, or delete the ubuntu user (as described in the link) in the child image. See this issue; the workaround there shows that downgrading to ubuntu 22.04 would resolve the issue.
The text was updated successfully, but these errors were encountered: