Skip to content

tombenke/darduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dockerized Arduino IDE

This project is about installing and running the Arduino IDE from a docker image.

You do not have to pollute your original operating system, with installing the several libs and the app itself. Instead you only need docker to be installed.

At the same time you can keep your projects on your disk, that the arduino docker container will reach through volumes.

This solution was made based on the Running GUI apps with Docker blog post written by Fábio Rehm.

Use the container

Run this if you want the container to be removed after the session:

    docker run \
        -it \
        --rm \
        --network=host \
        -e DISPLAY=$DISPLAY \
        -v $HOME/.Xauthority:/home/developer/.Xauthority \
        --device /dev/ttyUSB0:/dev/ttyUSB0 \
        -v $HOME/Arduino:/home/developer/Arduino \
        tombenke/darduino \
        arduino

Or you can use docker-compose script like:

version: "3.4"

services:
  arduino:
    image: tombenke/darduino
    container_name: arduino
    network_mode: "host"
    environment:
      - "DISPLAY=${DISPLAY}"
    volumes:
      - "/tmp/.X11-unix:/tmp/.X11-unix"
      - "/dev/ttyUSB0:/dev/ttyUSB0"
      - "${HOME}/topics:/topics"
    command: "arduino"
    privileged: true

or just simply run the ./arduino.sh shell script, which contains the command listed above.

In case you want to make changes, then start the container without the --rm switch, and execute the commit and push docker commands.

ESP8266 Board Manager usage

Starting with 1.6.4, Arduino allows installation of third-party platform packages using Boards Manager.

  1. Start Arduino and open Preferences window.
  2. Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.
  3. Open Boards Manager from Tools > Board menu and install esp8266 platform.
  4. Select your ESP8266 board from Tools > Board menu after installation. For ESP8266-12F, select the Generic ESP8266 Module.

References