mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 09:42:35 +00:00
Add devcontainer (#4491)
devcontainers can be used by IDEs/editors like VS Code to create a standardized development environment in a container
This commit is contained in:
parent
eddb72705f
commit
17b2a83b44
24
.devcontainer/Dockerfile
Normal file
24
.devcontainer/Dockerfile
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
FROM mcr.microsoft.com/devcontainers/cpp:1-debian-12
|
||||||
|
|
||||||
|
# [Optional] Uncomment this section to install additional packages.
|
||||||
|
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||||
|
&& apt-get -y install --no-install-recommends \
|
||||||
|
ca-certificates \
|
||||||
|
g++ \
|
||||||
|
git \
|
||||||
|
libbluetooth-dev \
|
||||||
|
libgpiod-dev \
|
||||||
|
liborcania-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libulfius-dev \
|
||||||
|
libyaml-cpp-dev \
|
||||||
|
pkg-config \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
python3-venv \
|
||||||
|
python3-wheel \
|
||||||
|
wget \
|
||||||
|
zip \
|
||||||
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN pip3 install --no-cache-dir -U platformio==6.1.15
|
28
.devcontainer/devcontainer.json
Normal file
28
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||||
|
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
|
||||||
|
{
|
||||||
|
"name": "Meshtastic Firmware Dev",
|
||||||
|
"build": {
|
||||||
|
"dockerfile": "Dockerfile"
|
||||||
|
},
|
||||||
|
"features": {
|
||||||
|
"ghcr.io/devcontainers/features/python:1": {
|
||||||
|
"installTools": true,
|
||||||
|
"version": "latest"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"extensions": [
|
||||||
|
"ms-vscode.cpptools",
|
||||||
|
"platformio.platformio-ide",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
|
"forwardPorts": [ 4403 ],
|
||||||
|
|
||||||
|
// Run commands to prepare the container for use
|
||||||
|
"postCreateCommand": ".devcontainer/setup.sh",
|
||||||
|
}
|
3
.devcontainer/setup.sh
Executable file
3
.devcontainer/setup.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
git submodule update --init
|
Loading…
Reference in New Issue
Block a user