Skip to content

Repository files navigation

Embedded Development Docker Containers

Reusable Docker containers for embedded systems development. Can be used across multiple projects with your own Docker registry or Docker Hub.

📦 Available Containers

1. ARM Cortex-M Development (arm-cortex-m/)

  • ARM GNU Toolchain 13.3
  • OpenOCD with ST-Link, J-Link support
  • GDB multiarch
  • STM32CubeMX compatible
  • Platforms: STM32, NRF52, SAMD, LPC, etc.

2. ESP32 Development (esp32/)

  • ESP-IDF v5.1.2
  • Esptool, ESP-IDF tools
  • Support for ESP32, ESP32-S2, ESP32-S3, ESP32-C3
  • Platforms: ESP32 all variants

3. RISC-V Development (riscv/)

  • RISC-V GCC toolchain 13.2.0
  • OpenOCD RISC-V support
  • Platforms: GD32V, CH32V, SiFive, etc.

4. Renesas RA Development (renesas-ra/)

  • ARM GNU Toolchain 13.3
  • J-Link Software & Tools
  • OpenOCD with J-Link support
  • Platforms: RA2, RA4, RA6 series (Cortex-M23/M4/M33)

5. Multi-Platform PlatformIO (platformio/)

  • PlatformIO Core
  • Support for 50+ platforms
  • Arduino framework
  • Platforms: Universal embedded development

6. Complete Embedded Suite (complete/)

  • All toolchains in one container
  • Best for development workstations
  • ~15.7GB image size (includes all tools)

🚀 Quick Usage

Build Containers

# Build specific container
cd arm-cortex-m
docker build -t <your-registry>/embedded-arm-cortex-m:latest .

# Build all containers
./build-all.sh

Push to Your Registry

# Tag for your registry (Docker Hub example)
docker tag embedded-arm-cortex-m:latest yourusername/embedded-arm-cortex-m:latest
docker push yourusername/embedded-arm-cortex-m:latest

# Or use your private registry
docker tag embedded-arm-cortex-m:latest registry.example.com/embedded-arm-cortex-m:latest
docker push registry.example.com/embedded-arm-cortex-m:latest

Pull and Run

# Pull from your registry
docker pull yourusername/embedded-arm-cortex-m:latest

# Run container
docker run -it --rm \
  --privileged \
  -v $(pwd):/workspace \
  yourusername/embedded-arm-cortex-m:latest

📚 Documentation

📋 Common Workflow

1. Development with Volume Mounting

# Start container with your project
docker run -it --rm \
  --name my-embedded-project \
  -v /path/to/project:/workspace \
  -v build-cache:/workspace/build \
  yourusername/embedded-arm-cortex-m:latest bash

# Inside container
cd /workspace
cmake -B build && cmake --build build

2. Flash Hardware

# With USB device passthrough
docker run -it --rm \
  --privileged \
  --device=/dev/bus/usb:/dev/bus/usb \
  -v $(pwd):/workspace \
  yourusername/embedded-arm-cortex-m:latest \
  openocd -f interface/stlink.cfg -f target/stm32f4x.cfg \
  -c "program /workspace/build/firmware.elf verify reset exit"

3. Using Docker Compose

version: '3.8'
services:
  embedded-dev:
    image: yourusername/embedded-arm-cortex-m:latest
    privileged: true
    devices:
      - /dev/bus/usb:/dev/bus/usb
    volumes:
      - ./:/workspace
      - build-cache:/workspace/build
    working_dir: /workspace

🔧 Container Details

All containers include:

  • Non-root user (developer:developer, UID/GID 1000)
  • USB device rules for debugging/flashing
  • Common build tools (cmake, ninja, make)
  • Git for version control
  • Pre-configured toolchains in /opt/

🛠️ Customization

Modify Dockerfiles

Each directory contains a Dockerfile you can customize:

  • Change toolchain versions
  • Add additional tools
  • Modify default configurations

Build with Custom Tags

docker build -t mycompany/embedded-arm:v1.0 ./arm-cortex-m/

📊 Container Sizes

Container Size Main Components
arm-cortex-m ~1.7GB ARM GCC, OpenOCD
esp32 ~10GB ESP-IDF, Python tools
riscv ~3.3GB RISC-V GCC, OpenOCD
renesas-ra ~1.7GB ARM GCC, J-Link
platformio ~3.7GB PlatformIO, 7 platforms
complete ~16GB All toolchains combined

🤝 Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new features
  • Submit pull requests
  • Share your configurations

📝 License

MIT License - See LICENSE file for details

🔗 Related Projects

💡 Tips

  • Use volume mounts for build caches to speed up compilation
  • Keep containers running for multiple build iterations
  • Use .dockerignore in your projects to exclude unnecessary files
  • Configure VS Code DevContainers for team consistency

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages