This is a self-contained environment that allows compiling and uploading Arduino source code without having to install anything on your computer, beside VSCode and Docker. It uses the VSCode's devcontainer built-in feature.
The included Docker file, the devcontainer.json file and the hello-world sample are licensed under the MIT License. All other files are governed by their respective licenses.
This devcontainer is based on Microsoft's CPP devcontainer using Debian and contains the required extensions to facilitate Arduino development.
The devcontainer is configured to launch the container with --privileged
options. This is required to access the serial ports from inside the Docker container. If your feel unsafe about that, you can remove this option and add an UDEV rule to configure the file permissions on the Arduino device automatically.
This devcontainer has been tested with the following environment:
- Fedora 36
- Docker 20.10.17
- VSCode 1.69.2
- Open the project in VSCode:
File->Open Folder
- Reopen it in devcontainer:
CTRL+SHIFT+P
to open the command palletRemote-Containers: Reopen in container
Most of the option below are also available from the status bar
From the command pallet, type Arduino: Board config
From the command pallet, type Arduino: Open serial monitor
From the command pallet, type Arduino: Library manager
ALT-CTRL-R
: Compile only
ALT-CTRL-U
: Compile and upload to the Arduino device
For more information about the Arduino extension for VSCode, consult this page.
If you need to install external librairies, use the arduino-cli lib install
command. See the end of the Docker files for more information.