-
Notifications
You must be signed in to change notification settings - Fork 90
Add devcontainer #48
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
Add devcontainer #48
Conversation
|
Note: When running the container on Podman 4 for macOS, it's necessary to specify mount-points when initializing VM so that it can be mounted to container. Examples of initialization: More details about mount-points: containers/podman#8016 (comment) Please include this hint in DevContainer file or in the documentation. @Mirabellensaft , @spookyvision : Please review this PR for adding support for DevContainer for VS Code. |
Added information about this in the esp-rs-devcontainer repository and a reference to it in espressif-trainings readme. |
|
Hi @SergioGasquez thank you for the contribution, I will test on Monday! |
Feature/gitpod: Add gitpod button
Add gitpod flashing and monitoring information
Feature/dockerfile
|
I updated my main branch with a Dockerfile, so users can edit Same could be done in Kudos to @georgik for the idea! |
|
Hello @SergioGasquez, thanks for the update. looks like I was a bit late, I tested an earlier state of your branch |
Sorry for merging it in advance, that commit includes the main changes of the branch. Let me know how it went! 😄 |
.devcontainer/Dockerfile
Outdated
| https://github.com/espressif/esp-idf.git $HOME/esp-idf | ||
| RUN $HOME/esp-idf/install.sh ${ESP_BOARD} | ||
| ENV IDF_PATH=$HOME/esp-idf | ||
| RUN git clone https://github.com/ferrous-systems/espressif-trainings.git && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My recommentation is to remove these compilation checks from the Dockerfile. One option is to make these run in a CI pipeline. But this is outside of the scope of this PR.
| { | ||
| "name": "espressif-training", | ||
| // Choose between "image" and "build" properties to pull built image or build from Dockerfile | ||
| "image": "docker.io/sergiogasquez/esp-rs-env:esp32c3-training", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to use the build property with the local Dockerfile as the default, otherwise the dev environment relies on this particular image to be available.
.devcontainer/Dockerfile
Outdated
| python3 python3-pip libusb-1.0-0 libssl-dev pkg-config libtinfo5 clang \ | ||
| && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts | ||
| RUN pip3 install websockets==10.2 | ||
| ARG CONTAINER_USER=gitpod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if it's possible to specify the user for Gitpod via .gitpod.yml or is it always a user named gitpod? I checked the documentation but could not find anything in my initial search related to that.
One option I see is to specify the Docker user explicitly (for example "esp"), regardless of the environment. This way the user would be consistent for docker CLI, VS Code devcontainer, Gitpod, etc. Some parts of the code also require a specific user to be present, for example file wowki/wowki-server.py expects its paths to contain name vscode.
Adding devcontainer to enable the use of Visual Studio Code remote containers to have a working environment with necessary dependencies among useful VSCode settings and extensions.
It also includes proper files to run Wokwi simulator with the exercises