Skip to content

Commit

Permalink
Fix dev-container templating (#70)
Browse files Browse the repository at this point in the history
* Update dev-container templating

* Remove redundant toolchain declaration

* updated CHANGELOG
  • Loading branch information
jazzz authored Jan 9, 2025
1 parent 636590a commit 19c9767
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- Verify the required options are provided (#65)
- Added missing template substitution in devcontainer.json (#70)

### Removed

Expand Down
3 changes: 0 additions & 3 deletions template/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ RUN if [ -n "${GITHUB_TOKEN}" ]; then export GITHUB_TOKEN=${GITHUB_TOKEN}; fi \
--log-level debug \
--export-file /home/${CONTAINER_USER}/export-esp.sh

# Set default toolchain
RUN rustup default {{ toolchain }}

# Activate ESP environment
RUN echo "source /home/${CONTAINER_USER}/export-esp.sh" >> ~/.bashrc

Expand Down
15 changes: 10 additions & 5 deletions template/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
//INCLUDEFILE dev-container
{
"name": "{{ crate_name }}",
//REPLACE project-name project-name
"name": "project-name",
// Select between image and build properties to pull or build the image.
// "image": "docker.io/espressif/idf-rust:{{ mcu }}_latest",
//REPLACE mcu mcu
// "image": "docker.io/espressif/idf-rust:mcu_latest",
"build": {
"dockerfile": "Dockerfile",
"args": {
"CONTAINER_USER": "esp",
"CONTAINER_GROUP": "esp",
"ESP_BOARD": "{{ mcu }}"
//REPLACE mcu mcu
"ESP_BOARD": "mcu"
}
},
"customizations": {
Expand Down Expand Up @@ -44,6 +47,8 @@
8000,
3333
],
"workspaceMount": "source=${localWorkspaceFolder},target=/home/esp/{{ crate_name }},type=bind,consistency=cached",
"workspaceFolder": "/home/esp/{{ crate_name }}"
//REPLACE project-name project-name
"workspaceMount": "source=${localWorkspaceFolder},target=/home/esp/project-name,type=bind,consistency=cached",
//REPLACE project-name project-name
"workspaceFolder": "/home/esp/project-name"
}

0 comments on commit 19c9767

Please sign in to comment.